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?".
grendell wrote:I'm not quite sure how to even search for this.
The answer to that is: grep the source code. Start by grepping just magick\*.h, for "transparent", any case. Scan down the short list, looking for a possible candidate. "TransparentPaintImage(" in paint.h looks promising, so examine that function in paint.c. Yes, that looks good.
Ah, thanks! For whatever reason, I didn't realize that -transparent was the command. That makes total sense now.
Unfortunately, this doesn't seem to be working because my Image doesn't have an alpha channel. When I write it to disk, it comes out as grayscale. I've tried SetImageAlphaChannel() and SetImageType() without success. Any suggestions? Thanks again.
Sorry, I am hopeless at debugging code I can't see.
TransparentPaintImage() calls SetImageAlphaChannel() if needed, so that should be ok. Are you setting the parameters correctly? What "opacity" value are you using, and is that correct? With a large fuzz value, eg 100%?