I’m experiencing interpolation issues as you can see in the images when converting a high-resolution PNG logo image to a .C array for display on a Duinotech SSD1351 XC3726 128 x 128 OLED display connected to an Arduino Uno.
What are the best practices to do this without introducing noticeable interpolation artifacts?
.C output to display with issues
I tried repeating the steps multiple times.
I tried different basic image resizing SASS products such as Gimp and Photopea but not photoshop then done the code conversion in the image converter of rinkydinkelectronics.com
I have made sure that I have all the correct and functional libraries requires in Arduino and that my Macbook pro isn’t optimising programme files to the cloud due to low memory space.
I did find some code line in git hub to do this (In processing) and it appeared to give me code but the image was too large. May try this again.
2
Answers
Judging by the image, I’d say you’re either saving or parsing the image at the wrong resolution. You could try playing with the way it’s rendered a bit or verifying the input and output settings from both sides.
You don’t have interpolation artifacts. You have one or more of:
You can use ImageMagick’s
convert
program:The above will yield
final.ppm
. The top part looks like:You can strip off the first three lines and [easily] convert this to an initializer list (with commas) that you put into a
.h
file.Remember it’s R/G/B, so there are three numbers per pixel.