linear

[« hard drive mod] [Main Index] [case mod two »]

image mini-howto

09/07/2001

How to host a decent image that won't make 56k modems burst into flame

a mini-howto

1) Acquire your image with the best resolution and color depth you can. For digital camera users, set your quality to highest, and use the largest format you have. For scanner users, set the resolution and color depth as high as possible. Saving this image as a format that doesn't use compression is the best choice here, but some cameras only support JPEG.

2) Now you've got a source file. This file has all the image information it can possibly hold, so it's huge. Don't post this file. Make a copy of it so that you can do your manipulations and retain the original source image. I use a separate directory for source images, and I rchive them to CD-R every few months.

3) Use the tool of your choice to reduce the image size to something acceptable for posting. 400x300 is a good target. Very important: if there is a lot of background around your subject, you should crop it out first before resizing. You'll wind up with a larger subject for the same size image. Photoshop is a great tool, but is expensive. ImageMagick is a great tool (but it's totally command line driven) and it's free. For extra clarity in your resized image, apply the Unsharp Mask filter (Photoshop settings of Amount: 60% Radius: 1 pixel Threshold: 1 level are good for a 400x300 image).

4) In your final save of the resized image, set your JPEG compression level appropriately. For Photoshop users, this means quality in the range 4-7 (not 10!). ImageMagick users should specify the -quality 40 switch in the resizing step.

5) What you should wind up with is a reasonably small file (10-25k) that still looks great. JPEG compression will outperform GIF compression for photographic images. Don't be afraid to compress. It benefits everyone--if you're paying for bandwidth, it benefits your pocket directly, but your users will thank you too.

Special Imagemagick info: I use ImageMagick even though I have Photoshop. It is excellent for bulk resizing of images. All the above operations can be combined into one command and applied to a directory full of images:

mogrify -geometry 400x300 -quality 40 -unsharp 1x1 *.JPG

I typically leave out the unsharp mask because the resize algorithm works nicely. ImageMagick is free, and it runs on lots of platforms. Go get it.


text, scripts and images copyright © 2001-2011 . All rights reserved.