Re: How to create an Captcha with TclMagick?



Hi,

to test it, i've Executed both Scripts, at the moment i use TclMagick
0.45. But both Scripts return an error when the command 'DrawImage'
was executed.

An example:

I start tclsh an execute:

% package require TclMagick
0.45
% set wnd [magick create wand]
magick8118C58
% set x 20
20
% set y 20
20
% set angle 0
0
% set txt "Tcl/Tk"
Tcl/Tk
% set clr [magick create pixel]
magick811DD88
% $clr SetColor cyan
% set drw [magick create draw]
magick8124F60
% $drw SetStrokeWidth 1.0
% $drw SetStrokeColor $clr
% $drw SetFillColor $clr
% $drw SetStrokeOpacity .8
% $drw SetFillOpacity .8
% $drw SetFontSize 24
% $drw rotate $angle
% $drw Annotation $x $y $txt
% $wnd DrawImage $drw

(I've typed it per hand)

But the last command returns: "Wand contains no images `MagickWand-1'"

The variable 'errorInfo' contains:

Wand contains no images `MagickWand-1'
while executing
"$wnd DrawImage $drw"

Could someone help me please?

.