PNG是否包含EXIF数据,如JPG?

时间:2022-10-25 21:16:06

I was wondering if PNG contains data like the following?

我想知道PNG是否包含如下数据?

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:

我所做的是将jpg文件转换为png格式,我希望能得到我在jpg上的相同信息,如下所示:

Currently using this as3 library to read the data.

目前使用这个as3库读取数据。

  • IDF0--- IDF @[134 - 248] (9 entries)
    • Orientation (SHORT) : 1
    • 方向(短):1
    • XResolution (RATIONAL) : 72/1
    • XResolution(理性):72/1
    • YResolution (RATIONAL) : 72/1
    • YResolution(理性):72/1
    • ResolutionUnit (SHORT) : 2
    • ResolutionUnit(短):2
    • Software (ASCIIx16) : QuickTime 7.6.6
    • 软件(ASCIIx16): QuickTime 7.6.6
    • DateTime (ASCIIx20) : 2011:10:02 22:43:37
    • 日期时间(ASCIIx20): 2011:10:02 22:43:37
    • HostComputer (ASCIIx16) : Mac OS X 10.6.8
    • HostComputer (ASCIIx16): Mac OS X 10.6.8
    • Exif IFD (LONG) : 8 34853
    • Exif IFD (LONG): 8 34853
    • GPS IFD (LONG) : 248
    • GPS IFD (LONG): 248
  • IDF0——IDF @(134 - 248)(9项)取向(短):1 XResolution(理性):72/1 YResolution(理性):72/1 ResolutionUnit(短):2软件(ASCIIx16):QuickTime 7.6.6 DateTime(ASCIIx20):2011:10:02 22:43:37 HostComputer(ASCIIx16):Mac OS x10.6.8 Exif IFD(长):8 34853年GPS IFD(长):248

 

 

  • EXIF IDF--- IDF @[8 - 134](10 entries)
    • ExifVersion (UNDEFINEDx4) : 0220
    • ExifVersion(UNDEFINEDx4):0220
    • DateTimeOrigina (ASCIIx20) : 2011:04:14 17:22:01
    • 日期日期日期:2011:04:14 17:22:01
    • UserComment (UNDEFINEDx63) : ASCII
    • UserComment(UNDEFINEDx63):ASCII
    • FlashpixVersion (UNDEFINEDx4) : 0100
    • FlashpixVersion(UNDEFINEDx4):0100
    • ColorSpace (SHORT) : 1
    • 色彩(短):1
    • PixelXDimension (LONG) : 1022
    • PixelXDimension(长):1022
    • PixelYDimension (LONG) : 486
    • PixelYDimension(长):486
    • Unknown (ASCIIx13) : Image Tag-LOL
    • 未知(ASCIIx13):图像taglol
    • SceneCaptureType (SHORT) : 0
    • SceneCaptureType(短):0
  • EXIF IDF-- IDF @[8 - 134](10个条目)存在版本(UNDEFINEDx4): 0220 DateTimeOrigina (ASCIIx20): 2011:00 04:14 17:22:01 UserComment (UNDEFINEDx63): ASCII FlashpixVersion (UNDEFINEDx4): 0100 ColorSpace (SHORT)

 

 

  • GPS IDF--- IDF @[248 - 338](7 entries)
    • Interoperability Index (ASCIIx2) : N
    • 互操作性指数(ASCIIx2): N
    • Interoperability Version (RATIONALx3) @425: 52/1, 1144/100, 0/1
    • 互操作性版本(RATIONALx3) @425: 52/1, 1144/ 100,0 /1。
    • Unknown (ASCIIx2) : W
    • 未知(ASCIIx2):W
    • Unknown (RATIONALx3) : 1/1, 4392/100, 0/1
    • 未知(RATIONALx3): 1/ 1,4392 /100, 0/1
    • Unknown (RATIONAL) : 5/1
    • 未知(理性):5/1
    • Unknown (ASCIIx2) : T
    • 未知(ASCIIx2):T
    • Unknown (RATIONAL) : 3694/117
    • 未知(理性):3694/117
  • (7个条目)互操作性指数(ASCIIx2): N互操作性版本(RATIONALx3) @425: 52/1, 1144/100, 0/1未知(ASCIIx2): W未知(RATIONALx3): 1/1, 4392/100, 0/1未知(RATIONAL): 5/ 4/117

 

 

4 个解决方案

#1


105  

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.

PNG不嵌入EXIF信息。但是,它允许在图像中嵌入元数据“块”。一些标准化的块对应于一些EXIF属性(物理维度、时间戳)。还可以将任意文本数据存储为key=>值对,或者定义新的块类型。所以,理论上你可以存储任何EXIF信息……但是,唉,用你自己的自定义格式。看起来,一些试图标准化的尝试没有跟上。

#2


24  

ImageMagick stores EXIF information in a PNG "Raw profile type APP1" zTXt chunk when converting from JPEG images. This method of storing EXIF in PNG images is also supported by ExifTool (and I believe Exiv2 too), but it is not part of the PNG or EXIF specification.

ImageMagick在从JPEG图像转换时将EXIF信息存储在PNG“原始概要类型APP1”zTXt块中。这种在PNG图像中存储EXIF的方法也得到了ExifTool的支持(我也相信是Exiv2),但它不是PNG或EXIF规范的一部分。

Edit: As of July 2017, PNG officially supports an eXIf chunk to store EXIF metadata (specification). ExifTool 10.59 and later write EXIF to this new chunk in PNG images.

编辑:到2017年7月,PNG正式支持eXIf块来存储eXIf元数据(规范)。然后在PNG图像中为这个新块编写EXIF。

#3


11  

PNG does not support embedding of EXIF information. When you convert from JPEG to PNG the information is lost.

PNG不支持嵌入EXIF信息。当您从JPEG转换到PNG时,信息将丢失。

#4


2  

As of July 2017, there does appear to be officially registered chunk for EXIF data called... eXIf:

截至2017年7月,EXIF数据似乎已正式注册了。eXIf:

The data segment of the eXIf chunk contains an Exif profile in the format specified in "4.7.2 Interoperability Structure of APP1 in Compressed Data" of [CIPA DC-008-2016] except that the JPEG APP1 marker, length, and the "Exif ID code" described in 4.7.2(C), i.e., "Exif", NULL, and padding byte, are not included.

eXIf块的数据段包含eXIf配置文件,格式如[CIPA DC-008-2016]中“4.7.2(C)中APP1的互操作性结构”中所指定的格式,但JPEG APP1标记、长度和4.7.2(C)中所描述的“eXIf ID代码”除外。,“Exif”、NULL和填充字节不包括在内。

Note that this is both A) only a few months old (as of writing) and B) an optional extension, not part of the basic specification. Therefore, support for the eXIf chunk might be limited in many applications.

注意,这两个都是A)只有几个月的历史(写作时)和B)可选的扩展,而不是基本规范的一部分。因此,对eXIf块的支持在许多应用程序中可能会受到限制。

#1


105  

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.

PNG不嵌入EXIF信息。但是,它允许在图像中嵌入元数据“块”。一些标准化的块对应于一些EXIF属性(物理维度、时间戳)。还可以将任意文本数据存储为key=>值对,或者定义新的块类型。所以,理论上你可以存储任何EXIF信息……但是,唉,用你自己的自定义格式。看起来,一些试图标准化的尝试没有跟上。

#2


24  

ImageMagick stores EXIF information in a PNG "Raw profile type APP1" zTXt chunk when converting from JPEG images. This method of storing EXIF in PNG images is also supported by ExifTool (and I believe Exiv2 too), but it is not part of the PNG or EXIF specification.

ImageMagick在从JPEG图像转换时将EXIF信息存储在PNG“原始概要类型APP1”zTXt块中。这种在PNG图像中存储EXIF的方法也得到了ExifTool的支持(我也相信是Exiv2),但它不是PNG或EXIF规范的一部分。

Edit: As of July 2017, PNG officially supports an eXIf chunk to store EXIF metadata (specification). ExifTool 10.59 and later write EXIF to this new chunk in PNG images.

编辑:到2017年7月,PNG正式支持eXIf块来存储eXIf元数据(规范)。然后在PNG图像中为这个新块编写EXIF。

#3


11  

PNG does not support embedding of EXIF information. When you convert from JPEG to PNG the information is lost.

PNG不支持嵌入EXIF信息。当您从JPEG转换到PNG时,信息将丢失。

#4


2  

As of July 2017, there does appear to be officially registered chunk for EXIF data called... eXIf:

截至2017年7月,EXIF数据似乎已正式注册了。eXIf:

The data segment of the eXIf chunk contains an Exif profile in the format specified in "4.7.2 Interoperability Structure of APP1 in Compressed Data" of [CIPA DC-008-2016] except that the JPEG APP1 marker, length, and the "Exif ID code" described in 4.7.2(C), i.e., "Exif", NULL, and padding byte, are not included.

eXIf块的数据段包含eXIf配置文件,格式如[CIPA DC-008-2016]中“4.7.2(C)中APP1的互操作性结构”中所指定的格式,但JPEG APP1标记、长度和4.7.2(C)中所描述的“eXIf ID代码”除外。,“Exif”、NULL和填充字节不包括在内。

Note that this is both A) only a few months old (as of writing) and B) an optional extension, not part of the basic specification. Therefore, support for the eXIf chunk might be limited in many applications.

注意,这两个都是A)只有几个月的历史(写作时)和B)可选的扩展,而不是基本规范的一部分。因此,对eXIf块的支持在许多应用程序中可能会受到限制。