Inkplate-Arduino-library icon indicating copy to clipboard operation
Inkplate-Arduino-library copied to clipboard

Not drawing BMP images from URL correctly.

Open chrisjtwomey opened this issue 3 years ago • 2 comments

I have this piece of code:

display.begin();
display.clearDisplay();
display.display();

if (!display.drawImage(url, 0, 0, false, false)) {
    display.println("Image open error");
}
display.display();

When url = "http://192.168.1.11:/homepage.png", Inkplate10 display draws image as I'd expect:

When url = "http://192.168.1.11:/homepage.bmp", the image drawn is almost completely black:

I thought maybe there was some funny business happening with how Inkplate is interpreting the background but inverting the image doesn't seem to make much of a difference:

I've attached both the png and bmp images I've been testing with below if anyone else wants to try them: homepage.zip

What's interesting is that trying the same files with a Waveshare board using GXEPD2, I get behaviour similar to PNG here. In the end, I've gotten around this by just using PNG, but still interested in the cause of this.

chrisjtwomey avatar Oct 08 '22 11:10 chrisjtwomey

Hi,

Try updating the Inkplate library to the latest and also the board definition. If that doesn't solve the problem, maybe the problem is in the color palette. Convert the image to 24-bit bmp as that seems to work best.

And of course, apologies for the late reply. We were quite busy, but in the future, we will try to answer all questions quickly

KarloLeksic avatar Apr 15 '23 08:04 KarloLeksic

I believe the pull request titled "Add missing default arguments and fix 1-bit BMP draw image from buffer" will fix this BMP display issue as that was the problem I was having trying to draw monochrome (1-bit) BMP images.

rspurlock avatar May 06 '23 05:05 rspurlock

Closing this as there's no more activity, please reopen the issue if you think it needs more attention

rsoric avatar Mar 25 '24 11:03 rsoric