txoof / epdlib

Python library for creating and writing modular layouts for e-paper screens
GNU General Public License v3.0
16 stars 8 forks source link

setting `'mode': 'RGB'` with `'rgb_support': True` in a layout has unexpected consequences to color output #52

Closed txoof closed 1 year ago

txoof commented 1 year ago

example:

basic_layout = {
      'hostname': {
         'type': 'TextBlock',  
          'mode': 'RGB',          
         'image': False,
         'max_lines': 1,
         'width': .5,
         'height': .14,
         'font': dir_path+'/../../fonts/Dosis/static/Dosis-SemiBold.ttf',
         # X, Y coordinate is absolute
         'abs_coordinates': (0, 0),
         'bkground': 'WHITE',
         'fill': 'BLACK',          
         'padding': 2,
         'hcenter': True,
         'vcenter': True,
         'align': 'center',
         'border_config': {'fill': 0, 'width': 2, 'sides': ['bottom']},
          'rgb_support': True
     },

Expected result when passing `'text_color': 'BLACK', 'bkground_color': 'WHITE':

expected

Actual result: actual

txoof commented 1 year ago

This only appears to affect 1 bit and L output; RGB output appears to be unaffected.

txoof commented 1 year ago

🤦 This is a non issue and due to an error in my program, not in the library.