2012-01-22, 06:55
This bit of code works fine on Windows/Linux/Openelec (it converts an image with indexed colour to RGB colour as transparency with indexed colour doesn't work properly):
...but I am told on ATV2 it results in:
...I suspect part of PIl that deals with loading indexed PNGs is missing (maybe it's an older version on the ATV2??)
Can anything be done about this at all? Update PIL on ATV2, alternate way of coding, etc??
Code:
try:
imageFileIndexed = radarBackgroundsPath + "idx." + fileName
imageFileRGB = radarBackgroundsPath + outFileName
image.retrieve(ftpStub + fileName, imageFileIndexed )
im = Image.open( imageFileIndexed )
rgbimg = im.convert('RGBA')
rgbimg.save(imageFileRGB, "PNG")
os.remove(imageFileIndexed)
except Exception as inst:
log("Error, couldn't retrieve " + fileName + " - error: ", inst)
...but I am told on ATV2 it results in:
Code:
22:09:46 T:209723392 NOTICE: OzWeather: Error, couldn't retrieve IDR.legend.0.png - error: decoder zip not available
22:09:46 T:209723392 NOTICE: OzWeather: Error, couldn't retrieve IDR023.background.png - error: decoder zip not available
22:09:46 T:209723392 NOTICE: OzWeather: Error, couldn't retrieve IDR023.locations.png - error: decoder zip not available
22:09:47 T:209723392 NOTICE: OzWeather: Error, couldn't retrieve IDR023.range.png - error: decoder zip not available
22:09:47 T:209723392 NOTICE: OzWeather: Error, couldn't retrieve IDR023.topography.png - error: decoder zip not available
22:09:47 T:209723392 NOTICE: OzWeather: Error, couldn't retrieve IDR023.catchments.png - error: decoder zip not available
...I suspect part of PIl that deals with loading indexed PNGs is missing (maybe it's an older version on the ATV2??)
Can anything be done about this at all? Update PIL on ATV2, alternate way of coding, etc??