Lossless JPEG Transformation

JPEG, or JPG, is a popular image compression format used by entry-level digital cameras. I often need to transform (e.g., rotate 90-degree) JPEG files downloaded from my camera. However, because JPEG is a 'lossy' compression format, each additional round of decompression and recompression leads to further degradation of image quality. One solution to prevent this problem is to use image manipulation programs that are capable of lossless transformation. Here are some of the programs that I use:

ImageMagick

Link: ImageMagick

A very powerful image manipulation package. I found the bundled PerlMagick library particularly useful. It has many more uses than transformation. For example, I wrote a set of perl scripts with this library to generate the image gallery and HTML codes for my family website, as shown in image_gallery.

If you want to install ImageMagick from source, make sure that some frequently used libraries are installed before running the configuration script. Some examples include:

exifiron

Link: exifiron

I like the command line interface (good for batch processing). It also works well with the integration into Mac OS X Automator work-flow. For example, to rotate the selected images to the left, put this in the Run Shell Script action in Automater and save as a Finder plug-in:

for f in "$@"
do
    /usr/local/bin/exifiron -r "$f"
done

Similarly, to rotate to the right, use:

for f in "$@"
do
    /usr/local/bin/exifiron -R "$f"
done
 
computer/lossless_jpeg.txt · Last modified: 2009/09/15 02:40 by chkuo
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki