Portable Image File (PIF) is an embedded-systems friendly, bitmap-like image format with ease of use and small size. This image format develops by the gfcwfzkm (aka Pascal) for low-end embedded systems. The file format and PIF's original implementation are available at https://github.com/gfcwfzkm/PIF-Image-Format.
In this project, I developed an open-source library for the above file format to get used in Lazarus and Delphi programming languages.
This PIF library supports Windows and Linux operating systems, including Raspberry Pi OS.
![]() |
Sample application in Linux environment. |
The library is available at https://github.com/dilshan/pascal-pif-library.
The library methods are self-explanatory, and sample projects are available for Lazarus and Delphi.
For example, the following code block demonstrates opening the Portable Image File and displaying it on the TImage.
var pifObj: TPortableImageFile; begin pifObj := TPortableImageFile.Create('sample-image.pif'); Image1.Picture.Bitmap := pifObj.Image; FreeAndNil(pifObj); end;
The sample projects are available in the samples directory of the project repository. The tests directory contains unit tests written using Lazarus.
Comments