Typical to/from EXIF conversions
Pavel Zlatovratskii <[email protected]> Sat, 11 Mar 2017 15:17:39 +0300
| Newsgroups | gmane.comp.graphics.png.general |
|---|---|
| Organization | TB.Budget |
| Message-ID | <[email protected]> |
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
1. Read and parse EXIF header (and JPEG header for JPEG).
2. Write PNG signature and IHDR chunk based on data from header.
3. Write pHYs chunk if resolution present.
4. Write tags "ImageDescription", "Model", "Software", "Artist",
"Copyright", "UserComment", "DateTimeOriginal" (and it's subsec and
timezone)as appropriate tEXt(iTXt; zTXt) chunk if any.
5. Write cHRM chunk if "WhitePoint" and "PrimaryChromacies" tags present.
6. Write gAMA chunk if "Gamma" tag present.
7. Remove any tags that inapplicable to PNG (like PlanarConfiguration).
8. Remove thumbnail.
9. Write processed EXIF header as eXIf chunk.
10. Convert image data and write IDAT and IEND chunks.
PNG to JPEG/EXIF conversion
1. Read IHDR and all chunks before IDAT.
2. Parse eXIf chunk
3. 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
4. Update(create) resolution tags with data of pHYs chunk.
5. Update(create) tags "ImageDescription", "Model", "Software",
"Artist", "Copyright", "UserComment", "DateTimeOriginal" (and it's
subsec and timezone) with data from appropriate tEXt(iTXt; zTXt) chunks.
6. Update(create) "Gamma" tag with data of gAMA chunk.
7. Recreate thumbnail image.
8. Write result EXIF as APP1 marker.
9. If iCCP is present - use JFIF-designed(B.5 of ICC.1:2004-10) way to
save it as APP2 marker.
10. 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.
11. 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