PNG Image: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
imported>Ikskoks
Line 70: Line 70:


PNG supports storing metadata information like '''Exif''', '''XMP''' and '''IPTC'''. <br>
PNG supports storing metadata information like '''Exif''', '''XMP''' and '''IPTC'''. <br>
Metadata can be easily edited with tools like [http://entropymine.com/jason/tweakpng/ TweakPNG], [https://exiftool.org/ ExifTool] or [https://www.logipole.com/metadata++-en.htm Metadata++].<br><br>
Metadata can be easily edited with tools like [http://entropymine.com/jason/tweakpng/ TweakPNG], [https://exiftool.org/ ExifTool] or [https://www.logipole.com/metadata++-en.htm Metadata++].<br>
Comparsion of all editors can be found [https://en.wikipedia.org/wiki/Comparison_of_digital_image_metadata_editors here].<br>
Comparsion of all editors can be found [https://en.wikipedia.org/wiki/Comparison_of_digital_image_metadata_editors here].<br><br>


Metadata can be stored in text chunks like '''tEXt''' and '''zTXt'''.<br>
Metadata can be stored in text chunks like '''tEXt''' and '''zTXt'''.<br>

Revision as of 14:26, 26 January 2021

PNG


Format Specifications

// PNG Image file format

// big endian

// header
8 bytes - magic // "89 50 4E 47 0D 0A 1A 0A" (PNG)

// chunks
num_of_chunks *
{
   4 bytes (uint32) - chunk data size
   4 bytes (char) - chunk type  // e.g. "IHDR"
   x bytes - chunk data
   4 bytes - CRC
}

Critical chunks

IHDR chunk data

This chunk have to occur as the first one in the PNG file, right after header.

4 bytes (uint32) - image width
4 bytes (uint32) - image height
1 byte (uint8) - image depth  // valid values are 1, 2, 4, 8, or 16
                              // e.g. 8bpp
1 byte (uint8) - color type  // It is sum of the following values: 
                             // 1 (palette used) 
                             // 2 (color used) 
                             // 4 (alpha channel used) 
                             // Valid values are 0, 2, 3, 4, and 6.
1 byte (uint8) - compression method  // "0" - deflate
                                     // Note: deflate is mandatory for all standard PNG files
1 byte (uint8) - filther method  // "0" - adaptive filtering with five basic filter types
1 byte (uint8) - interlace method  // "0" - no interlace
                                   // "1" - Adam7 interlace


// TODO - add more chunk descriptions


Ancillary chunks

zTXt chunk data

x bytes - keyword   // up to 78 bytes, e.g. "Raw profile type iptc"
1 byte - null separator
1 byte - compression method   // "0" - deflate
x bytes - compressed text

Metadata

PNG supports storing metadata information like Exif, XMP and IPTC.
Metadata can be easily edited with tools like TweakPNG, ExifTool or Metadata++.
Comparsion of all editors can be found here.

Metadata can be stored in text chunks like tEXt and zTXt.

MultiEx BMS Script

Not written yet.

Notes and Comments

None.

Compatible Programs

  • IrfanView
  • GIMP
  • MS Paint

Games

List of games using this file format:

  • Ragnarok Journey
  • Styx: Shards of Darkness
  • The Fall of Lazarus
  • The Tribez
  • Hamsterball
  • Many more...

See Also