Strange result from composite

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
AndreKR
Posts: 3
Joined: 2011-02-10T11:35:39-07:00
Authentication code: 8675308

Strange result from composite

Post 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é
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Strange result from composite

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