2014-01-19, 14:34
Hi,
I'm currently adapting Cees' Hue Ambilight Addon for XBMC with another color algorithm (k-mean vq). Then there's this tiny little problem: I'm rather new to python...
How do I convert an image from xbmc.RenderCapture.getImage to a standard PIL image (I need to use the "getcolors" method)?
When I use
I only get an black image with the correct dimensions as result.
Best,
Marc
I'm currently adapting Cees' Hue Ambilight Addon for XBMC with another color algorithm (k-mean vq). Then there's this tiny little problem: I'm rather new to python...
How do I convert an image from xbmc.RenderCapture.getImage to a standard PIL image (I need to use the "getcolors" method)?
When I use
Code:
size = (capture.getWidth(), capture.getHeight())
mode = 'RGBA'
img = Image.frombuffer(mode, size, capture.getImage(), 'raw', mode, 0, 1)
img.save("/storage/downloads/test.jpg")
I only get an black image with the correct dimensions as result.
Best,
Marc