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?".
Reset the virtual canvas (page) geometry after the crop. PNG preserves the +100+100 offset, and IM also adds its one small meta-data to preserve the images original canvas size too.
Anthony,
Thanks for your help. At this point I am just looking to make sure ImageMagick is installed correctly.
The following code I copied from your site at http://www.imagemagick.org/Usage/draw/.
#!/usr/bin/perl
# Rectangle
convert -size 100x60 xc:skyblue -fill white -stroke black \
-draw "rectangle 20,10 80,50" draw_rect.gif
This also gives me an error 500. Which leads me to believe I'm doing something wrong.
To eliminate any programming errors on my part could you please post a simple .pl script you know works.
#!/usr/bin/sh
echo "content/type: image/gif"
echo ""
convert -size 100x60 xc:skyblue -fill white -stroke black \
-draw "rectangle 20,10 80,50" gif:-
Note that this is a shell script, not a perl script, and that web servers expect to know what type of data is being returned so needs a minimal two line header. The gif:- then outputs the GIF result to STDOUT, and the webserver to web client stream.
None of this is an IM fault however, just 'usage'.