jpeg2png icon indicating copy to clipboard operation
jpeg2png copied to clipboard

Wish: copy exif data into destination PNG

Open fidergo-stephane-gourichon opened this issue 5 years ago • 1 comments

It sometimes makes sense to process JPEG files that have exif data in them. Currently, jpeg2png produces a PNG without the EXIF data. Writing a PNG with the original EXIF data would make sense. The program doesn't even have to parse it, just copy.

There are some precedents of straight code adoption for this. For example, how RawTherapee copied it from darktable: Add support for metadata in PNG · Issue #3352 · Beep6581/RawTherapee

Darktable code https://github.com/darktable-org/darktable/blob/master/src/imageio/format/png.c#L60 and how they tell it:

/* Write EXIF data to PNG file.
 * Code copied from DigiKam's libs/dimg/loaders/pngloader.cpp.
 * The EXIF embedding is defined by ImageMagicK.
 * It is documented in the ExifTool page:
 * http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/PNG.html
 *
 * ..and in turn copied from ufraw.

There is now an official specification for EXIF support in PNG: http://libpng.download/documents/pngext-1.5.0.html#History 3.7. eXIf Exchangeable Image File (Exif) Profile