From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Godot compressed texture" |
|---|
| claim | "The image block after the GST2 header is: u32 data format (0 raw, 1 PNG, 2 WebP, 3 Basis Universal), u16 width, u16 height, u32 mipmap count, u32 Image::Format, then for PNG/WebP (mipmaps+1) entries of u32 size plus an embedded PNG/WebP file." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Godot compressed texture" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "GST2 image block" |
|---|
| size_min | 16 |
|---|
| fields | | name | "data_format" |
|---|
| type | "u32" |
|---|
| offset | 0 |
|---|
|
| name | "width" |
|---|
| type | "u16" |
|---|
| offset | 4 |
|---|
|
| name | "height" |
|---|
| type | "u16" |
|---|
| offset | 6 |
|---|
|
| name | "mipmaps" |
|---|
| type | "u32" |
|---|
| offset | 8 |
|---|
|
| name | "image_format" |
|---|
| type | "u32" |
|---|
| offset | 12 |
|---|
|
|
|---|
| endianness | "little" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "load_image_from_file reads the fields and loops mipmaps+1 PNG/WebP sizes; DataFormat enum in compressed_texture.h lines 42-47." |
|---|
| repo | "https://github.com/godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "scene/resources/compressed_texture.cpp" |
|---|
| lines | "309-330" |
|---|
|
| type | "source" |
|---|
| detail | "FileAccess::big_endian = false by default, reset on each open" |
|---|
| repo | "https://github.com/godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "core/io/file_access.h" |
|---|
| lines | "91, 201-206" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "GST2 image block" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T21:57:23.627Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:37:18.841Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read CompressedTexture2D::load_image_from_file (compressed_texture.cpp 301-330): get_32 data_format, get_16 width, get_16 height, get_32 mipmaps, get_32 Image::Format, then for PNG/WebP a loop of mipmaps+1 (u32 size + payload). The raw and Basis branches are not covered by the claim." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:39:40.879Z" |
|---|
| summary | "Set byte order little: compressed_texture.cpp reads with f->get_32() and never sets big endian (FileAccess default little)." |
|---|
| changed | |
|---|
|
|
|---|