montage ... -transparent #COLOR failes to make color transpa
Posted: 2007-03-11T05:26:19-07:00
I had an old command from about a year ago to rotate two images, montage them together, and make the background color transparent, which was done with the following:
This used to work (on which version of ImageMagick I do not remember). The -quality 10 call was used when outputting the file as a .png.
When I moved to a new PC using version 6.3.2 Q16 (and now 6.3.3 Q16), and tried to re-run the batch file, the command no longer resulted in an image with a transparent background. I tried everything I could think of (specifying an Alpha value in the background color, moving the location of -transparent, etc...), but it would leave the background color intact. I tried using the .miff format in case something was getting lost, but nothing changed.
The solution was to simply mogrify the image:
My question, finally, is has anyone else noticed an issue with the -transparent tag when using montage? Why would -transparent work when mogrifying the resulting image, but not while creating the image? Am I doing something wrong in my montage call?
Code: Select all
montage -geometry +0+0 ( -background MistyRose -resize 200x200 -rotate -30 <file1> ) -geometry +0+0 ( -background MistyRose -resize 200x200 -rotate 30 <file2> ) -transparent MistyRose -quality 10 <output>
When I moved to a new PC using version 6.3.2 Q16 (and now 6.3.3 Q16), and tried to re-run the batch file, the command no longer resulted in an image with a transparent background. I tried everything I could think of (specifying an Alpha value in the background color, moving the location of -transparent, etc...), but it would leave the background color intact. I tried using the .miff format in case something was getting lost, but nothing changed.
The solution was to simply mogrify the image:
Code: Select all
mogrify -transparent MistyRose <output>"