User Tools

Site Tools


computers:lossless_jpeg

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:

jhead

Link: http://www.sentex.net/~mwandel/jhead/

jhead -ft -autorot *JPG

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:

After the required libraries are installed, install the ImageMagick and PerlMagick (inside the ImageMagick dir) following the directions on the ImageMagick website.

computers/lossless_jpeg.txt · Last modified: 2013/04/18 01:08 by chkuo