pimoroni / inky

Combined library for V2/V3 Inky pHAT and Inky wHAT.
https://shop.pimoroni.com/?q=inky
MIT License
590 stars 122 forks source link

Grainy Image issue #125

Closed Ikana closed 1 year ago

Ikana commented 3 years ago

I used the code on the example with little modification but when I display an image that I downloaded from unsplash the images are always grainy. 7bd0af8b9b44c1c3e4b2b587fb4176b302e39eeb_2_666x500

Gadgetoid commented 3 years ago

That’s the library attempting to convert a RGB image into a paletted one for display- the grain you’re seeing is dithering which looks terrible if it’s trying to approximate a solid colour.

You need to convert the images into 8bit PNG or another palette format with the correct colour order for them to display without automatic dithering occurring.

I go into a little bit more detail about how it all works here, but when converting your image it’s the order of the colours that matters and not the specific colours themselves - https://github.com/pimoroni/inky/issues/115