Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug or feature? #154

Open
IsNotMyUserName opened this issue Nov 9, 2023 · 3 comments
Open

Bug or feature? #154

IsNotMyUserName opened this issue Nov 9, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@IsNotMyUserName
Copy link

To begin, thank you for a cool thing.

I have the 3 color display, Red / Black / White and when I run test.mp4 it uses red as color.
Can this be adjusted to use black instead?

@IsNotMyUserName IsNotMyUserName added the bug Something isn't working label Nov 9, 2023
@robweber
Copy link
Collaborator

I'm not 100% sure what "red as color" is but I'm going to guess you want to just end up with a black and white image? If that's the case you can adjust the omni-epd config to only use black and white. If you want to adjust the palette filter so that a different color is drawn as red (like black) you can do that too.

For more info on the color mode and palette filtering read this: https://github.com/robweber/omni-epd/tree/main#advanced-epd-control

@IsNotMyUserName
Copy link
Author

I'm not 100% sure what "red as color" is but I'm going to guess you want to just end up with a black and white image? If that's the case you can adjust the omni-epd config to only use black and white. If you want to adjust the palette filter so that a different color is drawn as red (like black) you can do that too.

For more info on the color mode and palette filtering read this: https://github.com/robweber/omni-epd/tree/main#advanced-epd-control

I have this display
https://www.waveshare.com/7.5inch-HD-e-Paper-HAT-B.htm

And when test.mp4 runs it frames are drawn in red color. It works but looks well funky as red still images. Black would be better.
I suppose I can go into the code and modify to use only black.

I can for example use this code to draw black or red.
https://karooza.net/e-ink-notifaction-and-calendar-display

imageBlack = Image.new('1', (epd7in5bc.EPD_WIDTH, epd7in5bc.EPD_HEIGHT), 255) # 255: clear frame
imageRed = Image.new('1', (epd7in5bc.EPD_WIDTH, epd7in5bc.EPD_HEIGHT), 255) # 255: clear frame
draw = ImageDraw.Draw(imageBlack)
draw.text((20,245),'Hello World - Black', font = tohoma20, fill = 0)
draw = ImageDraw.Draw(imageRed)
draw.text((20,245),'Hello World - Red', font = tohoma20, fill = 0)

#Display image
epd.display(epd.getbuffer(imageBlack),epd.getbuffer(imageRed)

@robweber
Copy link
Collaborator

The easiest thing to do if you just want black and white is to change the mode to "bw".

For multi color displays essentially what happens is what you have listed in the code above. There is a palette of accepted colors, generally black, white, and whatever other color the display supports. The image if filtered based on these colors and the two resulting images sent to the EPD. Since the test.mp4 file is only in b/w already I would imagine it's taking anything in sort of a "gray" and making it red. I don't have that specific display to test myself but I see it is marked at tested in the compatible displays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants