Page 1 of 1

RESOLVED: possible bug tile: IM 6.9.7.3 Q16 Mac OSX

Posted: 2017-01-12T16:37:43-07:00
by fmw42
I seem to be having trouble keeping the transparency of an mpr: tiled image when using the tile:mpr:img. I am not sure it is a bug or a limitation of tile:. The mpr:img contains transparence, but after tiling it, it loses all transparency and I cannot seem to maintain it using -alpha on -channel rgba. Am I missing some key setting to allow it to maintain transparency? Or is my syntax not correct? Does tile: not support the alpha channel?

The following syntax works fine:

Code: Select all

convert \( -size 240x240 xc:none -fill black \
-gravity NorthWest -draw "text 10,10 'Copyright'" \
-gravity SouthEast -draw "text 5,15 'Copyright'" \
-write mpr:copyright +delete \) \
-size 640x480 xc:red -fill mpr:copyright -alpha on -channel rgba -draw 'color 0,0 reset' \
test1.png
Image

The following syntax does not work:

Code: Select all

convert \( -size 240x240 xc:none -fill black \
-gravity NorthWest -draw "text 10,10 'Copyright'" \
-gravity SouthEast -draw "text 5,15 'Copyright'" \
-write mpr:copyright +delete \) \
-size 640x480 tile:mpr:copyright -alpha on -channel rgba \
test2.png
Image


Here is a simpler example of the problem with tile: losing transparency.

Code: Select all

convert logo: -resize 25% -transparent white logo_sm_t.png
convert -size 640x480 -alpha set -channel rgba tile:logo_sm_t.png -alpha set -channel rgba test3.png
Image

Re: possible bug tile: IM 6.9.7.3 Q16 Mac OSX

Posted: 2017-01-17T11:15:41-07:00
by GeeMack
fmw42 wrote: 2017-01-12T16:37:43-07:00The following syntax does not work:

Code: Select all

convert \( -size 240x240 xc:none -fill black \
-gravity NorthWest -draw "text 10,10 'Copyright'" \
-gravity SouthEast -draw "text 5,15 'Copyright'" \
-write mpr:copyright +delete \) \
-size 640x480 tile:mpr:copyright -alpha on -channel rgba \
test2.png
Using IM 6.9.6-0 on Windows 10 64, if I add "-background none" to your command somewhere before the "tile:mpr:copyright", it gives me "test2.png" with the copyright words on a transparent background.

Re: possible bug tile: IM 6.9.7.3 Q16 Mac OSX

Posted: 2017-01-17T13:02:08-07:00
by fmw42
Thanks, Geemack. You are right. I should have considered that I specified no background color after -size. It makes sense now. So both these commands do work correctly.

Code: Select all

convert \( -size 240x240 xc:none -fill black \
-gravity NorthWest -draw "text 10,10 'Copyright'" \
-gravity SouthEast -draw "text 5,15 'Copyright'" \
-background none -write mpr:copyright +delete \) \
-size 640x480 tile:mpr:copyright \
test2.png

Code: Select all

convert logo: -resize 25% -transparent white logo_sm_t.png
convert -size 640x480 -background none tile:logo_sm_t.png test3.png

Re: RESOLVED: possible bug tile: IM 6.9.7.3 Q16 Mac OSX

Posted: 2017-01-18T05:15:35-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.