Hello everyone.
Is there a way to upload PNG images via .startDecode method, but including a transparent color parameter ("#XXrrggbb") ? I can not do that. If I upload a PNG image directly in the XML skin variable, over pixmap="path", everything is OK and the transparency in the PNG image works. However, if I upload an image through the familiar enigma2 algorithm (rendering function while running the program), then transparent pixels are ignored. I also tried to change backgroundColor (in parameter settings via .setPara) in my function, but it was unsuccessful.
Thanks.
The referenced image rendering algorithm (from my Screen class):
def imgRender(self, path): self.imgfile = path if exists(self.imgfile): self.sc = AVSwitch().getFramebufferScale() self.img = ePicLoad() if self.img: self.img.setPara(( sizemaxH, sizemaxV, self.sc[0], self.sc[1], False, 1, '#FF000000' )) # max-X, max-Y, scale-X, scale-Y, aspect_ratio=1.000000, cache=0, resize=1, bg=#FF000000 if self.img.startDecode(self.imgfile, 0, 0, False) == 0: ptr = self.img.getData() if ptr is not None: self["layer_pic"].instance.setPixmap(ptr) # original entry: .instance.setPixmap(ptr.__deref__()) self["layer_pic"].show() del self.img
Edited by s3n0, 28 May 2018 - 11:54.