Package: libjpeg-progs
Version: 6b-14
Severity: grave

From the man page:
        NAME
               jpegtran - lossless transformation of JPEG files
        ...
               ... But by the same token, jpegtran cannot perform lossy 
operations
               such as changing the image quality.
        ...
               -copy comments
                      Copy only comment markers.  This setting  copies  
comments  from
                      the source file, but discards any other inessential data.
        
               -copy all
                      Copy  all  extra  markers.  This setting preserves 
miscellaneous
                      markers found in the source file, such as Exif data, JFIF 
thumb‐
                      nails and Photoshop settings.  In some files these extra 
markers
                      can be sizable.
        
                      The default behavior is -copy comments.

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 thumbnail 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://bugzilla.redhat.com/show_bug.cgi?id=106060
     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.'

Severity "grave" based on the fact that this causes data loss.

Richard

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to