| « Error coding strategy | The "www." prefix is dead.... or almost ! » |
cjpeg - Targa (tga) to JPEG (jpg) - simpler, faster but not dirty - the quality is excellent !
Linux, Fedora Add commentsIf you ever need to transform to JPEG from Targa images (tga) - produced by some very popular games as screen shots - and you don't want to use the all mighty ImageMagick - which on my machine can process around 150 formats - you can try a simpler approach.
The simpler approach is cjpeg provided by the "Independent JPEG Group".
Follow up:
NAME
cjpeg - compress an image file to a JPEG file
SYNOPSIS
cjpeg [ options ] [ filename ]
DESCRIPTION
cjpeg compresses the named image file, or the standard input if no file is named, and produces a JPEG/JFIF file on the standard output. The cur-
rently supported input file formats are: PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkit for-
mat). (RLE is supported only if the URT library is available.)
I have used this on a project and the best results I had were with:
cjpeg -quality 70 -optimize -progressive -targa -restart 10 -max 15m -outfile OUT-FILE.JPG -verbose IN-FILE.TGA
The quality parameter can be changed as you wish... I ended up making it an extra configuration parameter thus I could tweak it to any value I wanted.
Of course, as you can see from the manual extract, it can compress other files as well.
It also has some nice companion programs:
djpeg - decompress a JPEG file to an image file
jpegtran - lossless transformation of JPEG files - transformations are done "without ever fully decoding the image"
rdjpgcom - display text comments from a JPEG file
wrjpgcom - insert text comments into a JPEG file
Have fun with it !
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Recent comments