Optimize All JPEG Images With Jpegtran Utility

July 15th, 2009 by junal Leave a reply »

I was looking for an utility that compress an image without losing the current quality of it. According to Yslow guideline it says “Jpegtran does lossless JPEG operations such as rotation and can also be used to optimize and remove comments and other useless information (such as EXIF information) from your images. ”

Installing (Linux)

  • Download jpegtran library from here

  • Unpack and paste the executable file under /usr/bin folder.

  • Open the command-line and try this > jpegtran -h command to check if its working

Options:

-Optimize

Perform optimization of entropy encoding parameters.

-Progressive

Create progressive JPEG file.

-Restart N

Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if “B” is attached to the number.

-Scans file

Use the scan script given in the specified text file.

Command example:

> jpegtran -copy none -rotate 270 -optimize /home/junal/Desktop/Junal/DSC_4164.JPG > /home/junal/Desktop/Junal/DSC_4166.JPG

it reduced the current size 3.4 MB to 3.2MB, keeping the same quality of the image, bingo!

The jpegtran command-line program is useful to:

  • Optimize the Huffman coding layer of a JPEG file to increase compression,
  • Convert between progressive and non-progressive JPEG formats,
  • Eliminate non-standard application-specific data inserted by some image programs, or
  • To perform certain transformations on a file, such as:
    • grayscaling,
    • rotating and flipping (within certain limits), and
    • cropping

to make all these tasks easier you can use imgopt which does all these above easier way. You just need to download the library file and paste it in the right path , now you just have to show the image folder that you want to optimize. And you can do it for both JPEG and PNG file as well.

Installing (Windows)

Windows users can get an executable file from here http://sylvana.net/jpegcrop/

Reference: http://en.wikipedia.org/wiki/Jpegtran

Advertisement

View Comments

  1. mbt outlet says:

    Well , the view of the passage is totally correct ,your details is really reasonable and you guy give us valuable informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good information we can learn in this forum!
    http://www.sin-game.com

Leave a Reply

blog comments powered by Disqus
Get Adobe Flash playerPlugin by wpburn.com wordpress themes