Originally posted by troyz If you're a cheap geek, errr. . . if you prefer command-line driven open-source software,
you could use the
mogrify command of the imagemagick package
Cheap geek here !
I use
convert instead of
mogrify to write the resized image to a new file. I also sharpen the resized image, and add a simple border to it at the same time.
The command I use is equivalent to this:
Code:
convert filename.jpg\
-resize 800x800 \
\( +clone \
-colorspace HSB -channel Luminance -separate -colorspace gray +channel -unsharp 0x2.0+0.5+0.0 \
-compose Luminize -composite \
\) \
-bordercolor white -border 1 \
-bordercolor black -border 19 \
filename-web.jpg
Basically:
- Resize the image to 800x800
- Apply "smart sharpening" (i.e. USM on a grayscale version of the luminance channel)
- Add a 1-pixel white border
- Add a 19-pixel black border around the white one
- Write to a new file
This is all wrapped in a script that process a list of files I give it, with the size and borders all configurable on the command-line.
I don't mind making the script available if someone wants it, but it is meant for Linux systems. It *might* work under Cygwin bash shell in Windows, but I have not tested it.