Preparing photos for a web photo album
A few tips how to prepare photos for a web photo album:
- Make a copy of the picture that you would like to have on web. The following steps include instructions that will irreversibly change your photos.
- Rotate them correctly. A lot of cameras writes an information about the rotation into the header of a image file (one of the EXIF values). Unfortunately not all web albums can recognise this information correctly.
Install thejhead
application and type this:Bash-
jhead -autorot photo.jpg
-
- Remove unnecessary data. My Canon camera saves also a thumbnail of the photo into the image file, that is cca 10kB. It is completely useless for a web album (it will create its own thumbnails anyway).
It is easy to remove it with thejhead
application:Bash-
jhead -dt photo.jpg
Of course, the first and the second step can be done together for all your pictures:
Bash-
jhead -dt -autorot *
-
- Reduce the resolution. If you do not need to publish your photos in the full resolution (no, you do not need, indeed ;), it is a good idea to reduce the resolution to save visitor’s time and bandwidth.
I like themogrify
application from the ImageMagick package. The following line reduces the resolution to 1024×768 and reduces the JPEG quality to 70%:BashDo not worry about rotated photos,
mogrify
will handle them correctly. -
Well, your photos (as image files) are ready for your web album :)
P.S.
For the SimpleViewer Flash album viewer I make a copy of image files to the thumbs
directory and use the following command to make thumbnails: