Page 1 of 1

Re: Some questions to MagickPolaroidImage()

Posted: 2007-12-01T09:08:24-07:00
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