A command-line tool that converts image files to RGB565 format C arrays for embedded systems and displays.
- Converts images to 16-bit RGB565 format
- Generates paired .c/.h files with uint16_t arrays
- Supports BMP, JPEG, PNG, and GIF formats
- Optimized for embedded graphics applications
# Using Make
make build
# Using Go directly
go build./img2rgb565 image.pngThis generates:
image.c- Array definition with RGB565 pixel dataimage.h- Header file with extern declaration
$ ./img2rgb565 logo.png
# Creates logo.c and logo.h
# In your C code:
#include "logo.h"
// Use img_logo[] array (16-bit RGB565 values)To support additional image formats, add the corresponding decoder to the import section in main.go.