====== 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: [[http://www.imagemagick.org/|ImageMagick]] A very powerful image manipulation package. I found the bundled [[http://www.imagemagick.org/script/perl-magick.php|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 [[http://thekuofamily.org/|my family website]], as shown in [[computers: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: * [[http://www.ijg.org/|libjpeg]] * [[http://www.libtiff.org/|LibTIFF]] After the required libraries are installed, install the ImageMagick and PerlMagick (inside the ImageMagick dir) following the directions on the ImageMagick website.