Reputation: 525
I have an image file, which is 1048592 bytes length. 16 bytes header and 1048576 bytes data. The begining bytes of its hex looks like below, does anyone know how to decode it?
504b 4d20 3130 0000 0400 0800 0400 0800
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0203 0310 37ff ff00 485f 76d2 0d99 0331
7878 8f3e 110e 1186 2a2a 3bc9 7391 f733
1d1d 1de2 fff7 0008 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
0000 0002 ffff 0000 1213 14d0 337f 7f80
4444 4685 1d91 333f 2636 37cd 3b9d 7fbb
0303 0315 f777 cccc 0000 0002 ffff 0000
0000 0002 ffff 0000 0000 0002 ffff 0000
....
Upvotes: 2
Views: 1443
Reputation: 678
The header states it is a PKM image format.
The format is:
From Game Developers SE Question
Upvotes: 4
Reputation: 713
File format:
// PKM file format
// header (16 bytes)
4 bytes (char) - signature // "PKM "
2 bytes (char) - version // "10 or "20"
2 bytes (uint16) - image type // e.g. 0 - ETC1_RGB_NO_MIPMAPS
2 bytes (uint16) - image width
2 bytes (uint16) - image height
2 bytes (uint16) - original image width
2 bytes (uint16) - original image height
x bytes - image data
Some tools to handle PKM files:
ARM Texture Compression Tool
Ericsson's texture compression tool (ETCPACK)
Noesis (native support by "fmt_etc_pkm.py")
Upvotes: 1
Reputation: 184
You can convert the "PKM 10" format .pkm files to .png format using the following program: https://forum.ragezone.com/f857/pkm-encrypt-decrypt-convert-to-1179253/
Upvotes: -1
Reputation: 852
It seems like you met this image format: https://community.arm.com/thread/3968
It has PKM 10 in the beginning
Upvotes: 1