Debian Package a Day ([info]debaday) wrote,
@ 2004-08-20 08:00:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
libjpeg-progs - : Programs for manipulating JPEG files
This package contains programs for manipulating JPEG files: cjpeg/djpeg: convert to/from the JPEG file format rdjpgcom/wrjpgcom: read/write comments in JPEG files jpegtran: lossless transformations of JPEG files

Ian B. suggested libjpen-progs. I haven't tried it myself.
libjpeg-progs contains a few command-line scripts:
  • cjpeg/djpeg: convert to/from the JPEG file format

  • rdjpgcom/wrjpgcom: read/write comments in JPEG files

  • jpegtran: lossless transformations of JPEG files

One of the more interesting is jpegtran. Most programs that manipulate images are format-neutral, so they'll decode the jpeg, do the transformation, then reencode -- which means you've double-encoded the file, and you'll have more jpeg distortion; jpegtran can rotate and flip your jpegs without any loss of quality.


More information on this package can be found on the Debian web site.
(If there is a package you would like to see featured here, go to the userinfo page and follow the directions there to submit your entry.)

Now available in RSS and ATOM flavors too.



(Post a new comment)

Good timing
[info]toastfiend
2004-08-20 12:33 pm UTC (link)
That's uncanny - I had just rotated several photographs yesterday using convert, thinking how irritating it is that it you loose quality doing so... Good job I kept the originals, I'll do it again with this program :-)

(Reply to this)

good stuff
[info]toykeeper
2004-08-20 03:32 pm UTC (link)
I can vouch for jpegtran. I've been using it to rotate photos for my photo album. It tends to dump any EXIF tags in an image, but I don't care about those anyway. Otherwise, it's great; it's a fast and lossless way to orient your pictures correctly.

Here is a script I use for rotating an image 90 degrees, ~/bin/jrot90. It preserves the original timestamp, assuming the date actually represents when the picture was taken. The beep is just to let me know it's done, because I launch it in the background from a file manager. It can similarly do 180 or 270 degrees if desired:

#!/bin/sh
T=/tmp/jrot.$$.jpg
cp $1 $T
touch -r $1 $T
jpegtran -rotate 90 $T > $1
touch -r $T $1
rm $T
beep -l 50 -f 1000

(Reply to this) (Thread)

Re: good stuff
(Anonymous)
2004-08-25 01:56 am UTC (link)
You can use something like:

jhead -cmd 'jpegtran -rotate 90 -outfile &o &i'

in order to keep the EXIF information while doing the rotation.

(Reply to this) (Parent)(Thread)

Re: good stuff
(Anonymous)
2004-08-26 02:47 am UTC (link)

Also jpegtran can retain the Exif information, if you specify -copy all. However, when swapping the width and height of the image (when rotating by 90 degrees, for example), it does not adjust all related Exif fields, such as XResolution and YResolution.

My exifiron utility (a C program linked against libjpeg) transforms images automatically according to the Orientation tag, including the embedded Exif thumbnail if you do not want to remove it to save space. It adjusts all related Exif fields accordingly. It also can restore the file timestamp from the DateTime records. See the Freshmeat page (http://freshmeat.net/photomolo/) or the main site (http://www.funet.fi/pub/sci/graphics/packages/photomolo/).

Sadly, there is no Debian package for the utilities yet. Any volunteers? (I'm just a Debian user, not a Debian developer.)

(Reply to this) (Parent)(Thread)

Re: good stuff
(Anonymous)
2004-08-28 03:02 am UTC (link)
exiftran (packaged in sarge) does these things as well.

(Reply to this) (Parent)

Rotate jpeg
(Anonymous)
2004-09-25 10:03 pm UTC (link)
gThumb rotates jpegs without loss

(Reply to this)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…