Simple image processing for APF platform and author icon images.
The creation script converts a 521x165 platform image or a 36x356 author icon 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 a platform image for display on the Pocket:
- Create a 521x165 greyscale platform image (transparent pixels will be converted into white)
- Save image as PNG
- Run:
npm run create input.png <platform_id>.bin- Place this image in the appropriate platform folder in
/Platforms/_images/.
To prepare an author icon image for display on the Pocket:
- Create a 36x36 greyscale author icon image (transparent pixels will be converted into white)
- Save image as PNG
- Run:
npm run create input.png icon.bin- Place this image in the appropriate core folder in the
Cores/<core_name>/.
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 platform input.bin output.pngTo extract a previously created APF author icon image, run:
npm run extract icon input.bin output.png
