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.
/* 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.
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: