-
Notifications
You must be signed in to change notification settings - Fork 0
.pdn
PDN is the extension for paint.net project files which as of right now are only compatible with paint.net itself with seemingly no preexisting documentation in sight, let’s see if we can figure out how it works.
Compatible with: paint.net
Offset 0..3 > 0x50, 0x44, 0x4E, 0x33 (PDN3) > Magic number May vary depending on the version of paint.net
Offset 4..6 > XML header length
Near the beginning of a .pdn file is an XML styled header containing basic information about the project file such as it’s resolution, layer count, and more.
This section of the XML header defines the project file’s thumbnail, but this doesn’t actually represent the raw thumbnail data. Rather, the raw thumbnail is split into 6-bit segments that then get translated into ASCII characters, and then those get strung together into an ASCII string that represents the thumbnail in-file.
The cipher for which ASCII character each raw 6-bit value pertains to is as follows…
| xxx000 | xxx001 | xxx010 | xxx011 | xxx100 | xxx101 | xxx110 | xxx111 | |
| 000xxx | A | B | C | D | E | F | G | H |
| 001xxx | I | J | K | L | M | N | O | P |
| 010xxx | Q | R | S | T | U | V | W | X |
| 011xxx | Y | Z | a | b | c | d | e | f |
| 100xxx | g | h | i | j | k | l | m | n |
| 101xxx | o | p | q | r | s | t | u | v |
| 110xxx | w | x | y | z | 0 | 1 | 2 | 3 |
| 111xxx | 4 | 5 | 6 | 7 | 8 | 9 | + | / |
The ‘thumb png’ ASCII string always ends with ‘=’.
TODO: Figure out how the rest of this file format works.