Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
For years I've been using an "action" I made in Photoshop to make smaller
versions of my large JPEG photos. For every JPEG file in a directory, the
action would make a JPEG 640 pixels wide and another 320 pixels wide. It
had to put them in the same fixed location so I had another script to move
them to where I wanted them.
Now, finally, I tried ImageMagick on an Ubuntu machine. It didn't take
too long to figure out how it worked. The first few downsized files I
made were vastly superior to what I was getting from Photoshop, but then I
realized that my file sizes were larger -- more than double the size of
the Photoshop files. So I read a little more about -strip and -quality
and I titrated -quality so that I was getting the same filesize as
Photoshop was producing. These are the commands I was then using for 320
and 640 pixel wide images:
convert infile.jpg -strip -quality 80 -resize 320 -filter Lanczos -sharpen 0x0.7 outfile.jpg
convert infile.jpg -strip -quality 80 -resize 640 -filter Lanczos -sharpen 0x0.7 outfile.jpg
Here is an example of ImageMagick and Photoshop downsized output files
along with the original:
http://taxa.epi.umn.edu/~mbmiller/pics/20080701_Adriana/comparison/
If you can do better, let me know because I will love to see your output
files and your method (just make sure your output file size is almost the
same as mine).
Now that the files were the same size, I still liked the ImageMagick files
better than the Photoshop files! That was a nice surprise. The truth may
be that Photoshop is better at this but I wasn't doing everything I could
to optimize its output. The reason is that it is a pain in the ass to
work with the Photoshop "actions" -- I don't want to mess with them.
ImageMagick uses command-line arguments instead of "actions" so it is a
piece of cake to make changes to settings. This also makes it easy to do
scripting. Here's what I'll be doing in bash:
mkdir 640 320
for file in $(\ls -1 *.jpg) ; do
for N in 640 320 ; do
convert $file -strip -quality 80 -resize ${N} -filter Lanczos -sharpen 0x0.7 ${N}/$file
done
done
By the way, I got some ideas here:
http://www.xs4all.nl/~bvdwolf/main/foto/down_sample/example1.htm
But that guy used Photoshop to "sharpen" his ImageMagick output file.
Maybe ImageMagick didn't have -sharpen back in 2004 when he made that
page.
Best,
Mike
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members