|Thanks to Fred and Anthony with a few pointers (and my hosting company
for the upgrade) I have this working and running as a shell script. On
the server which is running IMv6.5+ "-alpha transparent" works, whereas
locally I have to use "-matte -fill none -draw 'matte 0,0 reset'".
|
|
----------------------- the shell script (basis of a for loop)
-------------------------
|
# file fullname = 20090808084216.jpg
basename="20090808084216"
convert $basename.jpg -matte -bordercolor none -border 2 \
-format 'roundrectangle 1,1 %[fx:w-2],%[fx:h-2] 15,15' \
-write info:tmp.mvg \
\( +clone -matte -fill none -draw 'matte 0,0 reset' -background
none \
-fill white -stroke none -strokewidth 0 -draw @tmp.mvg \) \
-compose DstIn -composite \
\( +clone -matte -fill none -draw 'matte 0,0 reset' -background
none \
-fill none -stroke black -strokewidth 1 -draw @tmp.mvg \) \
-compose Over -composite $basename.1.png
rm -f tmp.mvg # Cleanup of temporary file
convert $basename.1.png -resize 482 -crop 480x480+1+1 -gravity Center
$basename.2.png
convert $basename.1.png -resize 150 $basename.thumb.png
rm -f $basename.1.png
-------------------------------------------
The probable gliche is that for the thumbnail it may be better to first
resize the image before donverting it and adding the border.
|
|
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users