Jump to main content

Jump to main menu

Henryk Richter

Support Software

Page Options
You are here: Startseite » Hardware » ILI9631 Atmel » Image converter 

Image Converter

Along with the driver, I've written a commandline based image converter that takes NetPBM or BMP images as input and writes Header-Files to be used with MCU implementations. The converter is a single-file C program without dependencies to external libraries. Consequently, it is not only cross-plattform capable but can easily be compiled without an IDE (e.g. gcc -o pnm2ILI9163 pnm2ILI9163.c). NetPBM and BMP images can be written with a myriad of OpenSource software (gimp, ImageMagicK) as well as heavyweight programs like Adobe's Photoshop.

Calling the program without arguments lists the syntax (pnm2ILI9163 [-dither n] [-indexed] [-flcm] infile.pnm outfile.h).

The output will by default be directly quantized to the target bit depths. Optionally, there are a number of popular dithering algorithms available to reduce quantization artifacts.

The program writes 12/16/18 Bit data by default. The selection relies on the _LCD_12BIT/_LCD_16BIT defines in ILI9163.h. So in order to use the output images, please load them after ILI9163.h.

Indexed color images are also supported in the converter. In order to output indexed color images, the inputs currently must be in 8 Bit BMP format (I didn't implement a color quantizer yet). The corresponding argument is "-indexed".

You find the source code to the converter in the "imgconvert" folder of the driver zip file.

12 Bit example image, with Burkes dithering
16 Bit example image, with Burkes dithering
18 Bit example image, with Burkes dithering