2015-10-03, 12:14
(2015-10-02, 09:50)marcelveldt Wrote:Hi Marcel,(2015-10-02, 04:28)jurialmunkey Wrote: Is it possible to have the colour swatches that are included with the skin be copied to addon folder also?
This would ensure a single path whilst still being able to include pre-generated swatches with the skin.
Also, is it possible to have a swatch generated when creating a custom colour in the dialog?
Latest Git should include your request:
1) Color swatch PNG files will be copied by default to the addons folder AND skin folder (if custom colors used)
2) Color swatch is also generated when a manual color or opacity is set
The only problem is Android because of the missing PIL module. I coded it that the script won't crash when the PIL is missing but it won't be able to generate the swatches.
I use skin.helper.service with Eminence 2 (both fantastic) and have been investigating the PIL problem "stack" after encountering it myself on AFTV under Kodi15.2rc2. Note that the core issue is with dynamic loading of the lib_imaging.so library needed by PIL python code.
I've tracked the changes you've made to ColorPicker.py, and can report that the new color swatch code works well: pre-generated color images included in Eminence are picked up and I can finally see and use the color picker! Also, I don't get UI hangs since you wrapped the call to Image.new in a try/except.
However, the code that checks for PIL availability does't work as expected:
Code:
#PIL fails on Android devices ?
hasPilModule = True
try:
from PIL import Image
except:
hasPilModule = False
I worked around this by explicity using a PIL.Image function to check it's working, e.g.:
Code:
hasPilModule = True
try:
from PIL import Image
im = Image.new("RGB", (1, 1)); del im
except:
hasPilModule = False
Many thanks!