add parameter for dithering
This commit is contained in:
parent
7bdec45c82
commit
1138f2d862
@ -63,6 +63,9 @@ class Inkyimage(inkycal_module):
|
|||||||
self.palette = config['palette']
|
self.palette = config['palette']
|
||||||
self.autoflip = config['autoflip']
|
self.autoflip = config['autoflip']
|
||||||
self.orientation = config['orientation']
|
self.orientation = config['orientation']
|
||||||
|
self.dither = True
|
||||||
|
if 'dither' in config and config["dither"] == False:
|
||||||
|
self.dither = False
|
||||||
|
|
||||||
# give an OK message
|
# give an OK message
|
||||||
print(f'{__name__} loaded')
|
print(f'{__name__} loaded')
|
||||||
@ -94,7 +97,7 @@ class Inkyimage(inkycal_module):
|
|||||||
im.resize(width=im_width, height=im_height)
|
im.resize(width=im_width, height=im_height)
|
||||||
|
|
||||||
# convert images according to specified palette
|
# convert images according to specified palette
|
||||||
im_black, im_colour = im.to_palette(self.palette)
|
im_black, im_colour = im.to_palette(self.palette, self.dither)
|
||||||
|
|
||||||
# with the images now send, clear the current image
|
# with the images now send, clear the current image
|
||||||
im.clear()
|
im.clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user