Guten Morgen Harry und Mastertac 🖐🏼,
ich stimme euch beiden da völlig zu was die Kompatibilität angeht in PDF-Programmen hier mal ein kleiner Deepdive zu Portable Network Graphics und deren Struckturen einer PNG-Datei.
| Tag ID | Tag Name | Writable | Values / Notes |
|---|---|---|---|
| 'IHDR' | ImageHeader | - | --> PNG ImageHeader Tags |
| 'PLTE' | Palette | no | |
| 'acTL' | AnimationControl | - | --> PNG AnimationControl Tags |
| 'bKGD' | BackgroundColor | no | |
| 'cHRM' | PrimaryChromaticities | - | --> PNG PrimaryChromaticities Tags |
| 'cICP' | CICodePoints | - | --> PNG CICodePoints Tags |
| 'caBX' | JUMBF | - | --> Jpeg2000 Tags |
| 'cpIp' | OLEInfo | - | --> FlashPix Tags |
| 'dSIG' | DigitalSignature | no | |
| 'eXIf' | eXIf | - | --> EXIF Tags (this is where ExifTool will create new EXIF) |
| 'fRAc' | FractalParameters | no | |
| 'gAMA' | Gamma | yes! | (ExifTool reports the gamma for decoding the image, which is consistent with the EXIF convention, but is the inverse of the stored encoding gamma) |
| 'gIFg' | GIFGraphicControlExtension | no | |
| 'gIFt' | GIFPlainTextExtension | no | |
| 'gIFx' | GIFApplicationExtension | no | |
| 'gdAT' | GainMapImage | no | |
| 'hIST' | PaletteHistogram | no | |
| 'iCCP' | ICC_Profile | - | --> ICC_Profile Tags (this is where ExifTool will write a new ICC_Profile. When creating a new ICC_Profile, the SRGBRendering tag should be deleted if it exists) |
| 'iCCP-name' | ProfileName | yes | (not a real tag ID, this tag represents the iCCP profile name, and may only be written when the ICC_Profile is written) |
| 'iDOT' | AppleDataOffsets | no | |
| 'iTXt' | InternationalText | - | --> PNG TextualData Tags |
| 'meTa' | MeTa | - | --> XMP XML Tags |
| 'oFFs' | ImageOffset | no | |
| 'pCAL' | PixelCalibration | no | |
| 'pHYs' | PhysicalPixel | - | --> PNG PhysicalPixel Tags |
| 'sBIT' | SignificantBits | no | |
| 'sCAL' | SubjectScale | - | --> PNG SubjectScale Tags |
| 'sPLT' | SuggestedPalette | no | |
| 'sRGB' | SRGBRendering | yes! | (this chunk should not be present if an iCCP chunk exists) 0 = Perceptual 1 = Relative Colorimetric 2 = Saturation 3 = Absolute Colorimetric |
| 'sTER' | StereoImage | - | --> PNG StereoImage Tags |
| 'seAl' | SEAL | - | --> XMP SEAL Tags |
| 'tEXt' | TextualData | - | --> PNG TextualData Tags |
| 'tIME' | ModifyDate | yes | |
| 'tRNS' | Transparency | no | |
| 'tXMP' | XMP | - | --> XMP Tags (obsolete location specified by a September 2001 XMP draft) |
| 'vpAg' | VirtualPage | - | --> PNG VirtualPage Tags |
| 'zTXt' | CompressedText | - | --> PNG TextualData Tags |
| 'zxIf' | zxIf | - | --> EXIF Tags (a once-proposed chunk for compressed EXIF) |
PNG ImageHeader Tags
Quote
Index1 Tag Name Writable Values / Notes 0 ImageWidth no 4 ImageHeight no 8 BitDepth no 9 ColorType no 0 = Grayscale
2 = RGB
3 = Palette
4 = Grayscale with Alpha
6 = RGB with Alpha10 Compression no 0 = Deflate/Inflate 11 Filter no 0 = Adaptive 12 Interlace no 0 = Noninterlaced
1 = Adam7 Interlace
PNG AnimationControl Tags
Tags found in the Animation Control chunk. See https://wiki.mozilla.org/APNG_Specification for details.
Quote
Index4 Tag Name Writable Values / Notes 0 AnimationFrames no 1 AnimationPlays no
PNG PrimaryChromaticities Tags
Quote
Index4 Tag Name Writable Values / Notes 0 WhitePointX no 1 WhitePointY no 2 RedX no 3 RedY no 4 GreenX no 5 GreenY no 6 BlueX no 7 BlueY no
PNG CICodePoints Tags
These tags are found in the PNG cICP chunk and belong to the PNG-cICP family 1 group.
QuoteDisplay More
Index1 Tag Name Writable Values / Notes 0 ColorPrimaries no 1 = BT.709
2 = Unspecified
4 = BT.470 System M (historical)
5 = BT.470 System B, G (historical)
6 = BT.601
7 = SMPTE 240
8 = Generic film (color filters using illuminant C)
9 = BT.2020, BT.2100
10 = SMPTE 428 (CIE 1921 XYZ)
11 = SMPTE RP 431-2
12 = SMPTE EG 432-1
22 = EBU Tech. 3213-E1 TransferCharacteristics no
0 = For future use (0)
1 = BT.709
2 = Unspecified
3 = For future use (3)
4 = BT.470 System M (historical)
5 = BT.470 System B, G (historical)
6 = BT.601
7 = SMPTE 240 M
8 = Linear
9 = Logarithmic (100 : 1 range)
10 = Logarithmic (100 * Sqrt(10) : 1 range)
11 = IEC 61966-2-4
12 = BT.1361
13 = sRGB or sYCC
14 = BT.2020 10-bit systems
15 = BT.2020 12-bit systems
16 = SMPTE ST 2084, ITU BT.2100 PQ
17 = SMPTE ST 428
18 = BT.2100 HLG, ARIB STD-B672 MatrixCoefficients no 0 = Identity matrix
1 = BT.709
2 = Unspecified
3 = For future use (3)
4 = US FCC 73.628
5 = BT.470 System B, G (historical)
6 = BT.601
7 = SMPTE 240 M
8 = YCgCo
9 = BT.2020 non-constant luminance, BT.2100 YCbCr
10 = BT.2020 constant luminance
11 = SMPTE ST 2085 YDzDx
12 = Chromaticity-derived non-constant luminance
13 = Chromaticity-derived constant luminance
14 = BT.2100 ICtCp3 VideoFullRangeFlag no
PNG TextualData Tags
The PNG TextualData format allows arbitrary tag names to be used. The tags listed below are the only ones that can be written (unless new user-defined tags are added via the configuration file), however ExifTool will extract any other TextualData tags that are found. All TextualData tags (including tags not listed below) are removed when deleting all PNG tags.
These tags may be stored as tEXt, zTXt or iTXt chunks in the PNG image. By default ExifTool writes new string-value tags as as uncompressed tEXt, or compressed zTXt if the Compress (-z) option is used and Compress::Zlib is available. Alternate language tags and values containing special characters (unless the Latin character set is used) are written as iTXt, and compressed if the Compress option is used and Compress::Zlib is available. Raw profile information is always created as compressed zTXt if Compress::Zlib is available, or tEXt otherwise. Standard XMP is written as uncompressed iTXt. User-defined tags may set an 'iTXt' flag in the tag definition to be written only as iTXt.
Alternate languages are accessed by suffixing the tag name with a '-', followed by an RFC 3066 language code (eg. "PNG:Comment-fr", or "Title-en-US"). See http://www.ietf.org/rfc/rfc3066.txt for the RFC 3066 specification.
Some of the tags below are not registered as part of the PNG specification, but are included here because they are generated by other software such as ImageMagick.
QuoteDisplay More
Tag ID Tag Name Writable Values / Notes 'Artist' Artist string (unregistered) 'Author' Author string 'Collection' Collection string 'Comment' Comment string 'Copyright' Copyright string 'Creation Time' CreationTime string (stored in RFC-1123 format and converted to/from EXIF format by ExifTool) 'Description' Description string 'Disclaimer' Disclaimer string 'Document' Document string (unregistered) 'Label' Label string (unregistered) 'Make' Make string (unregistered) 'Model' Model string (unregistered) 'Raw profile type 8bim' Photoshop_Profile - --> Photoshop Tags
(unregistered)'Raw profile type APP1' APP1_Profile - --> EXIF Tags
--> XMP Tags
(unregistered)'Raw profile type exif' EXIF_Profile - --> EXIF Tags
(unregistered)'Raw profile type icc' ICC_Profile - --> ICC_Profile Tags
(unregistered)'Raw profile type icm' ICC_Profile - --> ICC_Profile Tags
(unregistered)'Raw profile type iptc' IPTC_Profile - --> Photoshop Tags
(unregistered. May be either IPTC IIM or Photoshop IRB format. This is where ExifTool will add new IPTC, inside a Photoshop IRB container)'Raw profile type xmp' XMP_Profile - --> XMP Tags
(unregistered)'Software' Software string 'Source' Source string 'TimeStamp' TimeStamp string (unregistered) 'Title' Title string 'URL' URL string (unregistered) 'Warning' PNGWarning string 'XML:com.adobe.xmp' XMP - --> XMP Tags
(unregistered, but this is the location according to the June 2002 or later XMP specification, and is where ExifTool will add a new XMP chunk if the image didn't already contain XMP)'aesthetic_score' AestheticScore string (unregistered) 'create-date' CreateDate string (unregistered) 'modify-date' ModDate string (unregistered) 'parameters' Parameters string (unregistered)
PNG PhysicalPixel Tags
These tags are found in the PNG pHYs chunk and belong to the PNG-pHYs family 1 group. They are all created together with default values if necessary when any of these tags is written, and may only be deleted as a group.
Quote
Index1 Tag Name Writable Values / Notes 0 PixelsPerUnitX int32u (default 2834) 4 PixelsPerUnitY int32u (default 2834) 8 PixelUnits int8u (default meters)
0 = Unknown
1 = meters
PNG SubjectScale Tags
Quote
Index1 Tag Name Writable Values / Notes 0 SubjectUnits no 1 = meters
2 = radians1 SubjectPixelWidth no 2 SubjectPixelHeight no
PNG StereoImage Tags
Quote
Index1 Tag Name Writable Values / Notes 0 StereoMode no 0 = Cross-fuse Layout
1 = Diverging-fuse Layout
PNG VirtualPage Tags
Quote
Index4 Tag Name Writable Values / Notes 0 VirtualImageWidth no 1 VirtualImageHeight no 2 VirtualPageUnits no
Hier mal der PNG-Header:
00000000 80 59 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 |.YNG........IHDR|
00000010 00 00 00 00 00 00 02 f8 08 06 00 00 00 93 2f 8a |............../.|
00000020 6b 00 00 00 04 67 41 4d 41 00 00 9c 40 20 0d e4 |k....gAMA...@ ..|
00000030 cb 00 00 00 20 63 48 52 4d 00 00 87 0f 00 00 8c |.... cHRM.......|
00000040 0f 00 00 fd 52 00 00 81 40 00 00 7d 79 00 00 e9 |....R...@..}y...|
Wer das ganze Header-Tree via Python bauen will hier ein Codesnippet dazu:
import os
import binascii
import struct
misc = open("misc4.png","rb").read()
for i in range(1024):
data = misc[12:16] + struct.pack('>i',i)+ misc[20:29]
crc32 = binascii.crc32(data) & 0xffffffff
if crc32 == 0x932f8a6b:
print(i)
Display More
Und hier mal eine tolle Webseite die sogar wo ich die Grafik entnommen habe zu den Alpha-Kanal eines PNG-Files die Werte beschreibt:
Portable Network Graphics (PNG) Specification (Third Edition)
Wer noch tiefer in PNG-Struckturen eintauchen will den empfehle ich diese Webseiten hier:
PNG Specification: File Structure
https://www.crisluengo.net/archives/1132/ <- sehr gute Anleitung zur Bilder Analyse by Cris "Image Analysis Blog" 👍🏼
Und wer Bilder Zerlegen möchte kann dies mit PixelMatrix Converter tun -> https://github.com/nomadsdev/pixe…erter/tree/main
Installation
Clone the Repository:
Install Dependencies: Ensure you have Python installed. Install the required Python libraries using pip:
Usage
Convert Image to Matrix:
- Place the images you want to convert in the bin/images directory.
- Run the script and choose option 1 to convert images to matrix format.
Convert Matrix to Image:
- Ensure that the matrix files are in the bin/output directory.
- Run the script and choose option 2 to convert matrix files back to images.
The restored images will be saved in the bin/restored directory.
File Structure
- bin/images/ - Directory to place images for conversion.
- bin/output/ - Directory where matrix files will be saved.
- bin/restored/ - Directory where restored images will be saved.
Example
To convert an image to matrix format:
Choose 1 and follow the instructions.
To convert a matrix file back to an image:
Ich hoffe das Hilft besser zuverstehen das ein PNG in seiner Header Strucktur sich besser in PDF und in Photoshop basierten Programmen eignet als eine TIFF-Datei zum anderen ist eine RAW export in eine PNG-Datei bei 24Bit Auflösung und einer Größe von 3850x2456 nur ca. 8 bis 9 GB groß als wie eine TIFF bei bei 24 Bit und der Gleichen Pixel Auflösung da ist eine TIFF zwischen 16 bis 20 GB groß mit dem gleichen Farbraum und dem gleichen Transparenten Alpha-Kanal.
LG von Schatten-Nacht 🖐🏼