Simple image processing for APF platform images.
The creation script converts a 521x165 PNG image into a 16 bit greyscale bitmap, where the upper byte stores the brightness of the pixel, where white is 0x00
and black is 0xFF
. At the moment, the lower byte is always 0x00
. This image is stored rotated 90 degrees counter-clockwise (creating a resolution of 165x521).
To prepare an image for display on the Pocket:
- Create a 521x165 greyscale image (transparent pixels will be converted into white)
- Save image as PNG
- Run:
npm run create input.png <platform name>.bin
- Place this image in the appropriate platform folder in the
/Platforms/_images/
. See the Analogue docs for more information
Extracting an existing platform image will invert the color (back to what it started as) and revert the 90 degree rotation performed during creation.
To extract a previously created APF platform image, run:
npm run extract input.bin output.png