Skip to content

fixed issue with jpeg images showing in revert color#295

Open
spirosbond wants to merge 1 commit intoSolderedElectronics:masterfrom
spirosbond:fixed_jpeg_color_inversion
Open

fixed issue with jpeg images showing in revert color#295
spirosbond wants to merge 1 commit intoSolderedElectronics:masterfrom
spirosbond:fixed_jpeg_color_inversion

Conversation

@spirosbond
Copy link

When I use Black&White mode (1-Bit), the images are being drawn with reverse "colors"

Code I am using to initialize the display:

#if GRAYSCALE == 1
Inkplate display(INKPLATE_3BIT);
#else
Inkplate display(INKPLATE_1BIT);
#endif

Code I am using to draw image:

display->drawImage(imgPath.c_str(), x, y, 1, 0);

Input Image:
image

Rendered image:
image

If I set the "invert" option to 1 and still use 1-BitMode, I get a full black image:
display->drawImage(imgPath.c_str(), x, y, 1, 1);

image

If I use Grayscale (3-Bit) and use this line of code, the image shows up correctly:

display->drawImage(imgPath.c_str(), x, y, 1, 0);

image

This commit is fixing the issue and prints the images correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant