From 500bf5b4fbdfd45f58fff69deb542ccbd7237e6c Mon Sep 17 00:00:00 2001 From: missionfloyd Date: Sat, 1 Feb 2025 21:14:28 -0700 Subject: [PATCH 1/2] Add orange to spectra palette --- .../13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py | 2 +- .../RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py | 2 +- RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in3e.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/E-paper_Separate_Program/13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py b/E-paper_Separate_Program/13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py index d6043918..1781fdc8 100644 --- a/E-paper_Separate_Program/13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py +++ b/E-paper_Separate_Program/13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py @@ -227,7 +227,7 @@ def Init(self): def getbuffer(self, image): # Create a pallette with the 7 colors supported by the panel pal_image = Image.new("P", (1,1)) - pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0) + (0,0,0)*249) + pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 255,128,0, 0,0,255, 0,255,0) + (0,0,0)*249) # pal_image.putpalette( (0,0,0, 255,255,255, 0,255,0, 0,0,255, 255,0,0, 255,255,0, 255,128,0) + (0,0,0)*249) # Check if we need to rotate the image diff --git a/E-paper_Separate_Program/4inch_e-Paper_E/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py b/E-paper_Separate_Program/4inch_e-Paper_E/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py index ed055843..31fdb957 100644 --- a/E-paper_Separate_Program/4inch_e-Paper_E/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py +++ b/E-paper_Separate_Program/4inch_e-Paper_E/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py @@ -185,7 +185,7 @@ def init(self): def getbuffer(self, image): # Create a pallette with the 7 colors supported by the panel pal_image = Image.new("P", (1,1)) - pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0) + (0,0,0)*249) + pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 255,128,0, 0,0,255, 0,255,0) + (0,0,0)*249) # Check if we need to rotate the image imwidth, imheight = image.size diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in3e.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in3e.py index 59fc3c0c..ac0629c4 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in3e.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in3e.py @@ -180,7 +180,7 @@ def init(self): def getbuffer(self, image): # Create a pallette with the 7 colors supported by the panel pal_image = Image.new("P", (1,1)) - pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0) + (0,0,0)*249) + pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 255,128,0, 0,0,255, 0,255,0) + (0,0,0)*249) # pal_image.putpalette( (0,0,0, 255,255,255, 0,255,0, 0,0,255, 255,0,0, 255,255,0, 255,128,0) + (0,0,0)*249) # Check if we need to rotate the image From 33820695ddb3e4be0502e7790d37b2541ebf5261 Mon Sep 17 00:00:00 2001 From: missionfloyd Date: Fri, 11 Apr 2025 22:20:04 -0600 Subject: [PATCH 2/2] Revert 4in0 and 13in3 palettes --- .../13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py | 2 +- .../RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/E-paper_Separate_Program/13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py b/E-paper_Separate_Program/13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py index 1781fdc8..d6043918 100644 --- a/E-paper_Separate_Program/13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py +++ b/E-paper_Separate_Program/13.3inch_e-Paper_E/RaspberryPi/python/lib/epd13in3E.py @@ -227,7 +227,7 @@ def Init(self): def getbuffer(self, image): # Create a pallette with the 7 colors supported by the panel pal_image = Image.new("P", (1,1)) - pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 255,128,0, 0,0,255, 0,255,0) + (0,0,0)*249) + pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0) + (0,0,0)*249) # pal_image.putpalette( (0,0,0, 255,255,255, 0,255,0, 0,0,255, 255,0,0, 255,255,0, 255,128,0) + (0,0,0)*249) # Check if we need to rotate the image diff --git a/E-paper_Separate_Program/4inch_e-Paper_E/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py b/E-paper_Separate_Program/4inch_e-Paper_E/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py index 31fdb957..ed055843 100644 --- a/E-paper_Separate_Program/4inch_e-Paper_E/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py +++ b/E-paper_Separate_Program/4inch_e-Paper_E/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in0e.py @@ -185,7 +185,7 @@ def init(self): def getbuffer(self, image): # Create a pallette with the 7 colors supported by the panel pal_image = Image.new("P", (1,1)) - pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 255,128,0, 0,0,255, 0,255,0) + (0,0,0)*249) + pal_image.putpalette( (0,0,0, 255,255,255, 255,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0) + (0,0,0)*249) # Check if we need to rotate the image imwidth, imheight = image.size