Added full drawImage tests.

This commit is contained in:
nitko12 2020-09-18 10:29:20 +02:00
parent 1fd65df81b
commit c91f4224a2
1 changed files with 147 additions and 32 deletions

View File

@ -161,7 +161,7 @@ void loop()
display.clearDisplay(); display.clearDisplay();
delay(5000); delay(5000);
display.drawImage("png.jpg", 0, 0, dither, invert); display.drawImage("png.png", 0, 0, dither, invert);
display.display(); display.display();
display.clearDisplay(); display.clearDisplay();
delay(5000); delay(5000);
@ -188,12 +188,127 @@ void loop()
display.clearDisplay(); display.clearDisplay();
delay(5000); delay(5000);
display.drawImage("png.jpg", 0, 0, dither, invert); display.drawImage("png.png", 0, 0, dither, invert);
display.display(); display.display();
display.clearDisplay(); display.clearDisplay();
delay(5000); delay(5000);
} }
// web
display.selectDisplayMode(INKPLATE_1BIT);
display.setTextSize(2);
display.setTextColor(1);
display.setCursor(100, 100);
display.print("Displaying Lenna.jpg 1bit from web");
if (!dither)
display.print(" non");
display.print(" dithered and");
if (!invert)
display.print(" non");
display.print(" inverted.");
display.display();
display.clearDisplay();
delay(5000);
display.drawImage("https://raw.githubusercontent.com/e-radionicacom/Inkplate-6-Arduino-library/revision/test/"
"drawImage/Lenna.jpg",
0, 0, dither, invert);
display.display();
display.clearDisplay();
delay(5000);
}
for (int i = 0; i < 4; ++i)
{
bool dither = i & 1;
bool invert = i >> 1;
display.selectDisplayMode(INKPLATE_3BIT);
display.setTextSize(2);
display.setTextColor(1);
display.setCursor(100, 100);
display.print("Displaying Lenna.jpg 3bit from web");
if (!dither)
display.print(" non");
display.print(" dithered and");
if (!invert)
display.print(" non");
display.print(" inverted.");
display.display();
display.clearDisplay();
delay(5000);
display.drawImage("https://raw.githubusercontent.com/e-radionicacom/Inkplate-6-Arduino-library/revision/test/"
"drawImage/Lenna.jpg",
0, 0, dither, invert);
display.display();
display.clearDisplay();
delay(5000);
}
for (int i = 0; i < 4; ++i)
{
bool dither = i & 1;
bool invert = i >> 1;
display.selectDisplayMode(INKPLATE_1BIT);
display.setTextSize(2);
display.setTextColor(1);
display.setCursor(100, 100);
display.print("Displaying png.png 1bit from web");
if (!dither)
display.print(" non");
display.print(" dithered and");
if (!invert)
display.print(" non");
display.print(" inverted.");
display.display();
display.clearDisplay();
delay(5000);
display.drawImage("https://raw.githubusercontent.com/e-radionicacom/Inkplate-6-Arduino-library/revision/test/"
"drawImage/png.png",
0, 0, dither, invert);
display.display();
display.clearDisplay();
delay(5000);
}
for (int i = 0; i < 4; ++i)
{
bool dither = i & 1;
bool invert = i >> 1;
display.selectDisplayMode(INKPLATE_3BIT);
display.setTextSize(2);
display.setTextColor(1);
display.setCursor(100, 100);
display.print("Displaying png.png 3bit from web");
if (!dither)
display.print(" non");
display.print(" dithered and");
if (!invert)
display.print(" non");
display.print(" inverted.");
display.display();
display.clearDisplay();
delay(5000);
display.drawImage("https://raw.githubusercontent.com/e-radionicacom/Inkplate-6-Arduino-library/revision/test/"
"drawImage/png.png",
0, 0, dither, invert);
display.display();
display.clearDisplay();
delay(5000);
}
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)
{ {
bool dither = i & 1; bool dither = i & 1;
@ -206,7 +321,7 @@ void loop()
display.setTextColor(1); display.setTextColor(1);
display.setCursor(100, 100); display.setCursor(100, 100);
display.print("Displaying "); display.print("Displaying ");
display.print(images[j]); display.print(imagesBmp[j]);
display.print(" from web"); display.print(" from web");
if (!dither) if (!dither)
display.print(" non"); display.print(" non");
@ -219,7 +334,7 @@ void loop()
display.clearDisplay(); display.clearDisplay();
delay(5000); delay(5000);
display.drawImage(imageUrls[j], 0, 0, dither, invert); display.drawImage(imagesBmpUrls[j], 0, 0, dither, invert);
display.display(); display.display();
display.clearDisplay(); display.clearDisplay();
delay(5000); delay(5000);
@ -227,4 +342,4 @@ void loop()
} }
delay(5000); delay(5000);
} }