jpegtran is NOT lossless with metadata (Exif data, etc.) by default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libjpeg6b (Debian) |
Fix Released
|
Unknown
|
|||
libjpeg6b (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
From the man page:
NAME
...
... But by the same token, jpegtran cannot perform lossy operations
such as changing the image quality.
...
As you can see, jpegtran explicitly claims to be lossless. It even
further claims it "cannot perform lossy operations". (I realize now
that's only talking about image data.) But, the default for extra marker
copying is "-copy comment", which drops Exif data. This means that every
picture I've rotated with jpegtran has lost its Exif data. Luckily, I
probably don't need it that bad, but I was using this tool explicitly
because it's supposedly lossless.
I realize that the man page is clear about the default value of -copy,
but who reads an entire man page to find the one option that makes the
description under NAME untrue?
I propose these possible solutions, in order of preference:
1. Add a new argument to copy that behaves like -copy all, but
*updates* the JFIF and/or EXIF thumbnails after transforming
the image. Make this option the default.
2. Add a new argument to copy that behaves like -copy all, but
*drops* (does not copy) the JFIF thumbnails. Make this option
the default.
3. Make -copy all the default.
4. Add a new argument to copy that behaves like -copy comments, but
also copies exif markers. Make this option the default. The
first patch here might be useful, though I'm not sure if it also
copies comments:
https:/
5. Add an asterisk after lossless at the top of the man page and
then add a note under it such as, '* The only extra markers
copied by default are comments. This means certain data (Exif
data, JFIF thumbnails, Photoshop settings, etc.) will be lost.
To copy all extra markers, see the "-copy all" argument.'
Changed in libjpeg6b (Debian): | |
status: | Unknown → New |
Changed in libjpeg6b (Ubuntu): | |
status: | New → Confirmed |
Changed in libjpeg6b (Debian): | |
status: | New → Fix Committed |
Changed in libjpeg6b (Debian): | |
status: | Fix Committed → Fix Released |
Changed in libjpeg6b (Ubuntu): | |
status: | Confirmed → Fix Released |
I agree that the default of dropping EXIF metadata is not sensible.
Comment on proposals (1) and (2): Probably thumbnails /should/ be dropped by default if the -optimize option is specified.
Note that the version in Ubuntu Lucid is 6b (almost 13 years old!); the most recent version from http:// www.ijg. org/ is 8a (this year, 2010).