Page 1 of 1

Strange result from composite

Posted: 2011-02-10T11:43:41-07:00
by AndreKR
I am performing this operation:

composite +profile '*' -compose over +matte 'color.gif' 'menu.gif' 'mask.gif' 'output.gif'

on these images:
http://kundenweb.creations.de/usenet/im ... /color.gif
http://kundenweb.creations.de/usenet/im ... k/menu.gif
http://kundenweb.creations.de/usenet/im ... k/mask.gif

and I am getting this result:
http://kundenweb.creations.de/usenet/im ... output.gif

Is there a problem wirh my input files or is IM doing something wrong?

# composite -version
Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP

Regards,
André

Re: Strange result from composite

Posted: 2011-02-10T12:10:38-07:00
by fmw42
This works for me on IM 6.6.7.6 Q16 Mac OSX Tiger

convert menu.gif color.gif mask.gif -compose over -composite result.gif

whereas the correct syntax for composite would be (see http://www.imagemagick.org/Usage/compose/#compose)

composite color.gif menu.gif mask.gif -compose over PNG32:result.gif

as your mask image is 8-bit and not binary, you apparently need to force 32bit png or threshold your mask to binary and then use PNG8: when using composite rather than convert ... -composite


The PNG format has been worked on quite a bit over the last number of release and some changes have been make to improve it, but there may still be some bugs. (Some things may not have been folded back to composite, so you may be better using convert ... -composite).