[Magick++] Transparency

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
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: [Magick++] Transparency

Post by el_supremo »

I think you'd be better off not using the Draw methods. I don't know how to code this in C++ but this C code composites a transparent signature over a non-transparent base image. Maybe you can translate it to its equivalent in C++.

Code: Select all

	// Read the base image
	m_wand = NewMagickWand();
	MagickReadImage(m_wand,"logo:");

	/* Read the signature image */
	a_wand = NewMagickWand();
	MagickReadImage(a_wand,"sig.png");

	// Composite the signature over the base image
	MagickCompositeImage(m_wand,a_wand,OverCompositeOp,0,0);
	/* Write it out */
	MagickWriteImage(m_wand,"logo_sig.png");
Pete
Post Reply