RESOLVED: possible bug tile: IM 6.9.7.3 Q16 Mac OSX

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25932
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

RESOLVED: possible bug tile: IM 6.9.7.3 Q16 Mac OSX

Post 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

User avatar
GeeMack
Posts: 733
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: possible bug tile: IM 6.9.7.3 Q16 Mac OSX

Post by GeeMack »

fmw42 wrote:
2017-01-12T16:37:43-07:00
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
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.

User avatar
fmw42
Posts: 25932
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug tile: IM 6.9.7.3 Q16 Mac OSX

Post 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

User avatar
magick
Site Admin
Posts: 11126
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.

Post Reply