Python Forum
python script for gfx hat (LCD for raspberry)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python script for gfx hat (LCD for raspberry)
#11
Hi,

reading through the documentation, I guess that lcd.set_pixel() expects an 8-bit value for pixel. When you read a JPG image, you get at least a tuple of three 8-bit values like (128, 255, 10) for RGB. Thus, I guess you need to convert your image into one of gray shades first. I also guess that Pillow has a method for that. Just dig yourself through the documentation.

Regards, noisefloor
Reply


Messages In This Thread
RE: python script for gfx hat (LCD for raspberry) - by noisefloor - Jul-04-2019, 05:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Re-write BASH script to Python script popi75 5 2,605 Apr-30-2021, 03:52 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020