From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Format:PNG" |
|---|
| claim | "PNG colour types: 0 greyscale (bit depths 1, 2, 4, 8, 16), 2 truecolour RGB (8, 16), 3 indexed with PLTE (1, 2, 4, 8), 4 greyscale + alpha (8, 16), 6 RGBA (8, 16); 1 and 5 are invalid." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PNG" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "png_color_type" |
|---|
| underlying_type | "uint8" |
|---|
| values | | PNG_COLOR_TYPE_GRAY | 0 |
|---|
| PNG_COLOR_TYPE_RGB | 2 |
|---|
| PNG_COLOR_TYPE_PALETTE | 3 |
|---|
| PNG_COLOR_TYPE_GRAY_ALPHA | 4 |
|---|
| PNG_COLOR_TYPE_RGB_ALPHA | 6 |
|---|
|
|---|
| complete | true |
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "https://www.w3.org/TR/png-3/ section 6.1 Colour types and values" |
|---|
|
| type | "source" |
|---|
| detail | "PNG_COLOR_TYPE_GRAY 0, PALETTE (COLOR|PALETTE) 3, RGB 2, RGB_ALPHA 6, GRAY_ALPHA 4" |
|---|
| repo | "https://github.com/pnggroup/libpng" |
|---|
| commit | "cd952f49f95bb27154ae77dbb103032d95f6e580" |
|---|
| path | "png.h" |
|---|
| lines | "661-673" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "pngdump decoded PngSuite basn0g01-16, basn2c08/16, basn3p01-08, basn4a08/16, basn6a08/16" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Colour type" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T08:50:44.433Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:53:13.531Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read png.h at cd952f49 lines 661-673: MASK_PALETTE 1, MASK_COLOR 2, MASK_ALPHA 4; TYPE_GRAY 0, PALETTE 3, RGB 2, RGB_ALPHA 6, GRAY_ALPHA 4; complete (1 and 5 undefined). Bit depths per type come from the PNG spec and were not re-read." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-17T08:51:35.685Z" |
|---|
| summary | "Use libpng's macro names so exported enums do not collide (GRAY, RGB, NONE are too generic in one header)" |
|---|
| changed | |
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T17:43:02.149Z" |
|---|
| summary | "Mark complete: png.h defines PNG_COLOR_TYPE_GRAY 0, RGB 2, PALETTE 3, GRAY_ALPHA 4, RGB_ALPHA 6 (5 types; RGBA/GA are aliases)" |
|---|
| changed | |
|---|
|
|
|---|