LG .paf file format

PAF, or PDK Animation Format is an LG proprietary graphics format that was used on many of their phones, especially Qualcomm-powered ones.

Very little is known about the file format except that there are multiple versions of it, and a PAF file can contain multiple images in one file (e.g. boot animation).

Versions
As of now, the known versions of PAF go from version 1 to version 3.

The version can be identified by the header at the start of a file. PAF2 files for example start with "PAF2" or  in hex.

PAF files that are a different version than what the phone expects will not display correctly or not display anything at all (such as replacing a PAF3 boot animation with a PAF1 file).

The RLA format is the same as PAF, only having changes to the header (RLA instead of PAF) and the EOF text (RLAED instead of EndOfPAF). As of now, this variation is used in Lemon GC359 with versions 1 and 2.

Conversion Utilities
There are 2 known PAF image converters to exist, one being PafPxo Converter 4.0 and the other being Crawlerop's paftools library.

PafPxo Converter 4.0 is a standalone program that can convert PAF1 and PAF3 images to .png (although it incorrectly names them as .bmp), and can convert files to the .paf image type. It claims to support embedded images in .pxo application files as well, but this only seems to work correctly on .pxo files found in the LG Shine and LG Vu.

The paftools library is a set of python scripts for working with PAF files. paf_decoder.py can decode PAF files of nearly all types, converting the frames to .png format. Many types of PAF files have been tested, with favorable results over PafPxo Converter. paf_finder.py is a script that searches for PAF files in a firmware dump and exports them to separate files.

Neither program supports 2 bit per pixel (bpp) PAF files at the moment.

PafPxo Converter is okay if you want to convert an image to PAF, but if you want to convert PAF files to separate PNG frames, use paftools instead.