Convert PNG images to raw RGB565 framebuffer files for display on the Hak5 Wi-Fi Pineapple Pager.
The Wi-Fi Pineapple Pager display requires images in a specific raw framebuffer format (RGB565) that standard image files can't provide directly. You can't simply copy a PNG or JPEG to the device and display it. This tool bridges that gap by converting regular PNG images into the exact binary format the pager's framebuffer expects, handling the necessary rotation, resizing, and pixel format conversion automatically.
-
Install dependencies
pip install Pillow
-
Prepare your image
- Place a PNG file named
pager.pngin the script directory - The script will automatically rotate and resize it to fit the display
- Place a PNG file named
-
Convert the image
python convert.py
-
Transfer to device
scp image.raw root@<pineapple-ip>:/tmp/
-
Display on device
ssh root@<pineapple-ip> cat /tmp/image.raw > /dev/fb0
The script converts your image through these steps:
- Opens
pager.png - Rotates 90° clockwise to match pager orientation
- Resizes to 222×480 pixels
- Converts pixels to RGB565 format (5-6-5 bits, little-endian)
- Outputs
image.rawready for the framebuffer
- Resolution: 222×480 pixels
- Format: RGB565, little-endian
- Orientation: Rotated 90° right from source image
Edit convert.py to change:
- Input file: Replace
'pager.png'with your filename - Resolution: Update
img.resize((222, 480))for different displays - Pixel format: Modify the RGB565 packing logic and
struct.pack('<H', ...)call
convert.py– Conversion scriptdemo.png– Example input imageREADME.md– This file
This is example code for the Wi-Fi Pineapple Pager framebuffer. Verify the correct framebuffer device and format for your specific hardware before use.