Shawn Bright wrote:
> I cant seem to get an image rotate right.
> I am using RMagick to do this.
>
> the source image file is transparent with a single red line.
>
> image = Magick::Image.read('public/images/line.png').first
> image.rotate!(degrees.to_i)
>
> the problem is that when i do this, every pixel that was transparent
> becomes black.
>
> The docs said that this would be the case, but i cannot seem to find
> where to override this to preserve the transparency.
>
> thanks for any tips.
>
> sk
Try setting the image's background color to "none" before calling
rotate.