LG .paf file format

.paf, or Portable Animation File is an LG proprietary graphics format that was used on their Qualcomm-powered phones.

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).

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 are 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. PAF1 and PAF3 files have been tested, with generally more favorable results compared to PafPxo Converter. paf_finder.py is a script that searches for PAF files in a firmware dump and exports them to separate files.

Neither programs support 2 bit per pixel (bpp) PAF files at the moment.

PafPxo Converter is good if you want to convert an image to PAF, but not the other way around.