Re: Typical to/from EXIF conversions

Glenn Randers-Pehrson <[email protected]> Sat, 11 Mar 2017 07:29:16 -0500
Newsgroups gmane.comp.graphics.png.general
Message-ID <CA+PdXcvP958qHE0fc-t2WFYccY2d5gNwmfgVU=zf5iASyce3Gg@mail.gmail.com>
You've missed "image orientation".  I plan to add an "orNT" private PNG
chunk to ImageMagick and GraphicsMagick for handling that.  The
chunk only gets written when image->orientation, which is already
supported in both applications, is present and defined to be other
than the default TopLeft.  The orNT chunk will be placed
ahead of IDAT.

Glenn

On Sat, Mar 11, 2017 at 7:17 AM, Pavel Zlatovratskii <[email protected]> wrote:
> To make eXIf discussion more useful I tried to write my visions of "typical"
> scenarios to convert EXIF file to PNG.
>
> TIFF(JPEG/EXIF) to PNG conversion
>
> Read and parse EXIF header (and JPEG header for JPEG).
> Write PNG signature and IHDR chunk based on data from header.
> Write pHYs chunk if resolution present.
> Write tags "ImageDescription", "Model", "Software", "Artist", "Copyright",
> "UserComment", "DateTimeOriginal" (and it's subsec and timezone) as
> appropriate tEXt(iTXt; zTXt) chunk if any.
> Write cHRM chunk if "WhitePoint" and "PrimaryChromacies" tags present.
> Write gAMA chunk if "Gamma" tag present.
> Remove any tags that inapplicable to PNG (like PlanarConfiguration).
> Remove thumbnail.
> Write processed EXIF header as eXIf chunk.
> Convert image data and write IDAT and IEND chunks.
>
> PNG to JPEG/EXIF conversion
>
> Read IHDR and all chunks before IDAT.
> Parse eXIf chunk
> Remove any tags that marked as "J" or "N" in column "Compressed" of Table
> 17, Table 18, Table 19 or Table 20 of CIPA DC-008-2016
> Update(create) resolution tags with data of pHYs chunk.
> Update(create) tags "ImageDescription", "Model", "Software", "Artist",
> "Copyright", "UserComment", "DateTimeOriginal" (and it's subsec and
> timezone) with data from appropriate tEXt(iTXt; zTXt) chunks.
> Update(create) "Gamma" tag with data of gAMA chunk.
> Recreate thumbnail image.
> Write result EXIF as APP1 marker.
> If iCCP is present - use JFIF-designed(B.5 of ICC.1:2004-10) way to save it
> as APP2 marker.
> If both iTXt and tEXt(zTXt) with keyword "Comment" present - iTXt could be
> saved to "UserComment" of EXIF and tEXt(zTXt) could be saved to COM marker.
> Convert and write image data (SOI - EOI).
>
>
> What I missed? Any other visions?
>
> --
> Have a nice DOS.
>
> Pavel Zlatovratskii scondo-JGs/[email protected]; [email protected]
>
>
> ------------------------------------------------------------------------------
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford
> _______________________________________________
> png-mng-misc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/png-mng-misc
>

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford