Using command line tools, convert version 6.5.4 (fedora 12): convert someimage.png -background transparent -rotate -8.85795876362829 result.png
This results in a distorted image with black background instead of transparency.
On another machine I have version 6.5.1 (fedora 11) and here the command results in the wanted transparent background and no distortion of the image.
This also happens if I create the "someimage.png" with
convert -border 100 -bordercolor none -background transparent -pointsize 144 -gravity "West" -fill "#ff0000" -stroke "#000000" -strokewidth 2 -font myfont.ttf label:"\nHello World" tmp.png
convert tmp.png -trim +repage someimage.png
convert someimage.png -background transparent -rotate -45 result.png
Any hints on what I can do diffrent, or if this is a bug in the version of Image Magick Fedora 12 is using?
Rotating PNG losing transparency
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Rotating PNG losing transparency
convert someimage.png -background transparent -rotate 20 result.png
works just fine on my IM 6.5.9-0 Q16 Mac OSX Tiger. I suspect you just have a bug in the one version/platform. Perhaps you might try upgrading or reinstalling.
You could try
convert someimage.png -channel rgba -matte -background transparent -rotate 20 result.png
and see if that helps
works just fine on my IM 6.5.9-0 Q16 Mac OSX Tiger. I suspect you just have a bug in the one version/platform. Perhaps you might try upgrading or reinstalling.
You could try
convert someimage.png -channel rgba -matte -background transparent -rotate 20 result.png
and see if that helps