Some questions to MagickPolaroidImage()

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Some questions to MagickPolaroidImage()

Post by el_supremo »

It allows you to set the type of font for a caption, something like this:

Code: Select all

	m_wand = NewMagickWand();
	d_wand = NewDrawingWand();
	p_wand = NewPixelWand();
	MagickReadImage(m_wand,"logo:");
// Partially transparent red text
	PixelSetColor(p_wand,"#ff0000");
	PixelSetOpacity(p_wand,0.8);
	DrawSetFillColor(d_wand,p_wand);
	DrawSetFont(d_wand,"Arial");
	DrawSetFontSize(d_wand,24);
//This sets the caption text
	MagickSetImageProperty(m_wand,"Caption","TESTING");
	MagickPolaroidImage(m_wand,d_wand,20.)
It would appear though that a NULL drawing wand isn't allowed. So, if either you don't want a caption or you just want the default font/size/ etc., you must still pass a valid DrawingWand.

Pete
Post Reply