Batch operation on image files

Status
Not open for further replies.

kritonas

Posts: 49   +0
Hello all,

I've got a bunch of 128x128 png files and I would like to create a 1-2 pixels wide stroke around each one of them (as a frame). The size should remain the same, the stroke should overwrite what's already there.

It's for business so it doesn't really matter if the program is not free.
 
ImageMagick comes with a pile of command-line image manipulation tools. You want to run something like "convert -stroke blue -strokewidth 2 -fill none -draw 'rectangle 1,1 127,127' input.png output.png" This would draw a 2px wide blue border around input.png and save to output.png
 
thank you nodsu.
I've tried running the line you said, and I got some errors:

C:\>convert -stroke blue -strokewidth 2 -fill none -draw 'rectangle 1,1 127,127'
cheque.png cheque2.png
convert: unable to open image `1,1': No such file or directory.
convert: unable to open image `127,127'': No such file or directory.
convert: Non-conforming drawing primitive definition `rectangle'.

I checked the -draw syntax with their manual, it seems ok. any ideas?
 
It looks like it can't recognise the single quotes around the rectangle definition and tries to interpret the coordinates as filenames. Maybe try with double quotes?

I posted the command that works in unix, but the Windows versions of many programs have glitches and features that are not documented.
 
Status
Not open for further replies.
Back