Skip to content

n0tknowing/chunkinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chunkinfo - show information of PNG chunks

Installation

$ git clone https://github.com/n0tknowing/chunkinfo
$ cd chunkinfo
$ make

Example

$ ./chunkinfo test.apng
[IHDR] length 13 at offset 0x0000000c (f1fde38f)
	Width = 51
	Height = 50
	Bit depth = 8 per channel
	Color type = RGB with Alpha channel
	Channels = 4 per pixel (32 bits)
	Compression = 0 (zlib deflate/inflate)
	Filter = 0 (adaptive filtering)
	Interlace = 0 (no interlace)

[acTL] length 8 at offset 0x00000025 (f38d9370)
	Number of frames = 2
	Number of plays = 0 (infinite)

[fcTL] length 26 at offset 0x00000039 (aa53fc21)
	Width = 51
	Height = 50
	X offset = 0
	Y offset = 0
	Delays = 1000 (denominator 1000)
	Disposal = 0 (None)
	Blend = 1 (Over)

[IDAT] length 1085 at offset 0x0000005f (80ad91a6)
	Image data

[fcTL] length 26 at offset 0x000004a8 (6257f46c)
	Width = 23
	Height = 41
	X offset = 9
	Y offset = 9
	Delays = 500 (denominator 1000)
	Disposal = 0 (None)
	Blend = 1 (Over)

[fdAT] length 180 at offset 0x000004ce (e64f2ddc)
	.....

[IEND] length 0 at offset 0x0000058e (ae426082)
	No data

All OK.
Found 7 chunks from file test.apng

Supported chunks

  • IHDR
  • PLTE
  • IDAT [*]
  • tIME
  • pHYs
  • sRGB
  • gAMA
  • cHRM
  • iCCP (partial, color profile is still compressed...)
  • tEXt
  • iTXt (partial, UTF-8 text is not printed...)
  • zTXt (partial, text is still compressed...)
  • bKGD
  • sBIT
  • tRNS
  • sPLT
  • hIST
  • IEND
  • oFFs (PNG official extension)
  • sCAL (PNG official extension)
  • pCAL (PNG official extension)
  • gIFx (PNG official extension)
  • gIFg (PNG official extension)
  • sTER (PNG official extension)
  • acTL (from APNG)
  • fcTL (from APNG)

[*] = compile it with "make idat", it will create a file with filename "filename-IDAT.zlib", but if you want to run chunkinfo with same PNG file, you need to remove the previous "filename-IDAT.zlib", if not, in the next run it will append new IDAT to the same zlib file.

References

Notes

This software is far from perfect, no chunk checking like chunk ordering of IDAT and PLTE, because there are chunks that need to appear before IDAT and PLTE like cHRM, gAMA, and iCPP. The error message is not really useful too.

About

show information of PNG chunks

Resources

License

Stars

Watchers

Forks

Releases

No releases published