HomSpace Forum
Pirate Audio Display customization - Printable Version

+- HomSpace Forum (https://homspace.nl/forum)
+-- Forum: SamplerBox (https://homspace.nl/forum/forum-1.html)
+--- Forum: Community (https://homspace.nl/forum/forum-2.html)
+--- Thread: Pirate Audio Display customization (/thread-135.html)



Pirate Audio Display customization - WhiteTigerMort - 22-03-23

Hi all,

I was thinking if someone could help me a bit.
I wanted to add some customization to my sampler box with pirate audio display. I found the PIM_LCD.py and could change the font but when i  was trying to add an image the display stopped working. (the web interface worked and the sound was working)
As i don't really know python (I'm a front end dev) i tried to follow some documentation but mby i was wrong.

So what i did is i added something like this to the 'def __init__(self)':
Code:
self.bg_image = Image.open("modules/res/bg.jpg")
(tried different file types jpg/gif/png, tried to .convert(RGBA))

and in ' def display(self, msg, menu1, menu2, menu3):' in the biginnig of the "start drawing" section i added
Code:
# #########START DRAWING##########################

        self.draw.rectangle((0, 0, self.device.width-1, self.device.height-1), fill=(0,0,0)
        self.draw.bitmap((0, 0), self.bg_image, fill=0)
       
        # Draw the rest of the text and shapes

would really appreciate if someone could help me with this.