我知道我可以创建一个简单的基于 Qt 的应用程序来添加和读取 png 元数据,使用 QImage.setText(...) 和 QImage.text(...)。然后可以使用名为 pngmeta 的 linux 命令读取该元数据。
但是我可以使用哪些其他图像软件来读取 png 元数据?
请注意,我正在寻找通用平台的图像程序,因此请说明您的应用程序是用于 Windows 还是 Linux。
为了使问题更清楚,我附上了一个带有一些测试元数据的 img。

谢谢约翰
链接:
cYr*_*rus 84
使用ImageMagick:
identify -verbose image.png
Run Code Online (Sandbox Code Playgroud)
ImageMagick应该是跨平台的。我在 Linux 上使用您的附加图像进行了尝试:
[...] 特性: 作者:汉斯·穆勒 日期:2010-12-08 09:45 日期:创建:2010-12-08T13:15:43+01:00 日期:修改:2010-12-08T13:15:43+01:00 描述: 很久以前,在遥远的星系中...... 签名: 3b4a54202316a7ae4b4fe0e431d47958181f4bb893493355820d4ba74f9f5ee3 [...]
mal*_*lat 11
如果您正在寻找仅限 PNG 的解决方案,请尝试pngchunks:
$ sudo apt-get install pngtools
$ pngchunks UiagX.png
Chunk: Data Length 13 (max 2147483647), Type 1380206665 [IHDR]
Critical, public, PNG 1.2 compliant, unsafe to copy
IHDR Width: 800
IHDR Height: 600
IHDR Bitdepth: 8
IHDR Colortype: 2
IHDR Compression: 0
IHDR Filter: 0
IHDR Interlace: 0
IHDR Compression algorithm is Deflate
IHDR Filter method is type zero (None, Sub, Up, Average, Paeth)
IHDR Interlacing is disabled
Chunk CRC: 353637671
Chunk: Data Length 9 (max 2147483647), Type 1935231088 [pHYs]
Ancillary, public, PNG 1.2 compliant, safe to copy
... Unknown chunk type
Chunk CRC: 10132504
Chunk: Data Length 19 (max 2147483647), Type 1951942004 [tEXt]
Ancillary, public, PNG 1.2 compliant, safe to copy
... Unknown chunk type
Chunk CRC: -1325924661
Chunk: Data Length 21 (max 2147483647), Type 1951942004 [tEXt]
Ancillary, public, PNG 1.2 compliant, safe to copy
... Unknown chunk type
Chunk CRC: 134517081
Chunk: Data Length 58 (max 2147483647), Type 1951945850 [zTXt]
Ancillary, public, PNG 1.2 compliant, safe to copy
... Unknown chunk type
Chunk CRC: 1701487776
Chunk: Data Length 572939 (max 2147483647), Type 1413563465 [IDAT]
Critical, public, PNG 1.2 compliant, unsafe to copy
IDAT contains image data
Chunk CRC: 1174233759
Chunk: Data Length 0 (max 2147483647), Type 1145980233 [IEND]
Critical, public, PNG 1.2 compliant, unsafe to copy
IEND contains no data
Chunk CRC: -1371381630
Run Code Online (Sandbox Code Playgroud)
的输出pnginfo对于您的使用来说可能不够详细:
$ pnginfo UiagX.png
UiagX.png...
Image Width: 800 Image Length: 600
Bitdepth (Bits/Sample): 8
Channels (Samples/Pixel): 3
Pixel depth (Pixel Depth): 24
Colour Type (Photometric Interpretation): RGB
Image filter: Single row per byte filter
Interlacing: No interlacing
Compression Scheme: Deflate method 8, 32k window
Resolution: 2835, 2835 (pixels per meter)
FillOrder: msb-to-lsb
Byte Order: Network (Big Endian)
Number of text strings: 3 of 9
Author (tEXt uncompressed): Hans Müller
Date (tEXt uncompressed): 2010-12-08 09:45
Desc (tEXt uncompressed): A long time ago in a galaxy far far away....
Run Code Online (Sandbox Code Playgroud)
Exiftool上面说的看不出来
它可以处理多种图像格式,不仅仅是png......
它是一个“平台独立的 perl 模块”,也是一个可执行文件(可用于多个平台/操作系统)。
更多信息:http : //www.sno.phy.queensu.ca/~phil/exiftool/
pngcheck -c -v -t foobar.png
Run Code Online (Sandbox Code Playgroud)
这些是显示 PNG 块的相关选项:
-7 print contents of tEXt chunks, escape chars >=128 (for 7-bit terminals)
-c colorize output (for ANSI terminals)
-p print contents of PLTE, tRNS, hIST, sPLT and PPLT (can be used with -q)
-t print contents of tEXt chunks (can be used with -q)
-v test verbosely (print most chunk data)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
74190 次 |
| 最近记录: |