Customer:
I’m trying to display images on an Inkplate 6PLUS without using a SD card. I convert .png files to bitmap and try to display them using the Inkplate::display() method, but the converted bitmap shows only random noise instead of the actual image. When I use a SD card, everything works fine. Can you recommend tools for bitmap conversion or identify what might be going wrong?
Originally submitted via email support on 5 September 2023. Migrated to the forum for community visibility.
Soldered Support:
You can use the Inkplate image converter at Image Converter
How to use it:
- Upload your image (best results with .jpg)
- Select black and white or 3-bit grayscale mode, depending on which mode you are using in your sketch - this is important as it means a different image format
- Select dithering (optional)
- You can resize the image, but it works best if you pre-scale the image to your desired size on Inkplate
- Convert it and save the header file, then download and copy it to your sketch folder
To see how to display pictures from RAM, check out this example: Inkplate-Arduino-library/examples/Inkplate2/Advanced/Other/Inkplate2_Picture_From_RAM/Inkplate2_Picture_From_RAM.ino at master · SolderedElectronics/Inkplate-Arduino-library · GitHub - essentially it involves including the generated header file and calling drawImage.
The issue is likely that you’re trying to display a 3-bit converted image in black and white mode or vice versa. The pixel formatting is different in how it’s stored and interpreted in the image array, so these two modes are not compatible.
Customer:
The solution worked. Now I have another question: is it possible to use partial update with the 3-bit mode of the Inkplate 6PLUS? I’ve looked through the library but it doesn’t seem possible. The micropython library, in contrast, does have that feature. I found this old ticket that might be relevant: Partial update only works in 1-bit mode · Issue #44 · SolderedElectronics/Inkplate-Arduino-library · GitHub
Soldered Support:
The partialUpdate function is available only for 1-bit mode. If you want to do fast updates with images, dithering is usually a good way to make an image look way better while still using 1-bit mode for the fast updates. The data rates are limited so software tricks are needed to compensate where possible.
The micropython library recently received some important overhauls, and they’re still on the ‘dev’ branch of the repository. Testing is still being done before pushing to main.
Check this example for 2-bit grayscale on Inkplate 6PLUS in microPython: https://github.com/SolderedElectronics/Inkplate-micropython/blob/dev/Examples/Inkplate6PLUS/basicGrayscale.py
In contrast to this example (BW): https://github.com/SolderedElectronics/Inkplate-micropython/blob/dev/Examples/Inkplate6PLUS/basicBW.py
As you can see, partialUpdate is used for BW mode. The examples on the dev branch more accurately represent the capacities of the Inkplate boards, so if you’re interested in microPython, get the files and examples from there.