Does PNG contain EXIF data like JPG?

user1004413 picture user1004413 · Mar 3, 2012 · Viewed 78.6k times · Source

I was wondering if PNG contains data like the following?

What I did was to convert the jpg file to png format, and I was expecting to retrieve the same info I had on the jpg as below:

Currently using this as3 library to read the data.

  • IDF0--- IDF @[134 - 248] (9 entries)
    • Orientation (SHORT) : 1
    • XResolution (RATIONAL) : 72/1
    • YResolution (RATIONAL) : 72/1
    • ResolutionUnit (SHORT) : 2
    • Software (ASCIIx16) : QuickTime 7.6.6
    • DateTime (ASCIIx20) : 2011:10:02 22:43:37
    • HostComputer (ASCIIx16) : Mac OS X 10.6.8
    • Exif IFD (LONG) : 8 34853
    • GPS IFD (LONG) : 248

 

  • EXIF IDF--- IDF @[8 - 134](10 entries)
    • ExifVersion (UNDEFINEDx4) : 0220
    • DateTimeOrigina (ASCIIx20) : 2011:04:14 17:22:01
    • UserComment (UNDEFINEDx63) : ASCII
    • FlashpixVersion (UNDEFINEDx4) : 0100
    • ColorSpace (SHORT) : 1
    • PixelXDimension (LONG) : 1022
    • PixelYDimension (LONG) : 486
    • Unknown (ASCIIx13) : Image Tag-LOL
    • SceneCaptureType (SHORT) : 0

 

  • GPS IDF--- IDF @[248 - 338](7 entries)
    • Interoperability Index (ASCIIx2) : N
    • Interoperability Version (RATIONALx3) @425: 52/1, 1144/100, 0/1
    • Unknown (ASCIIx2) : W
    • Unknown (RATIONALx3) : 1/1, 4392/100, 0/1
    • Unknown (RATIONAL) : 5/1
    • Unknown (ASCIIx2) : T
    • Unknown (RATIONAL) : 3694/117

 

Answer

leonbloy picture leonbloy · Mar 6, 2012

Edit: Version 1.5.0 (July 2017) of the Extensions to the PNG 1.2 Specification has finally added an EXIF chunk. It remains to be seen if encoders-decoders begin to support it.

Original: PNG does not embed EXIF info. It allows, however, to embed metadata "chunks" inside the image. Some of the standardized chunks correspond to a few EXIF attributes (physical dimensions, timestamp). And it's also possible to store arbitrary textual data as key=>value pairs, or to define new chunk types. So, you could in theory store any EXIF information... but, alas, in your own custom format. Some attempts to standarize have not caught up, it seems.