Problem with PIL on ATV2/iOS
#1
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):

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??
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#2
bossanova808 Wrote: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):

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??

It looks like PIL is being built without ZLIB which is needed for work on PNG files. Does this happen only on ATV2/iOS ? It should be an easy fix at build time.(need to build an install ZLIB into the python directory before building XBMC) If this is the case, a ticket on Trac will be needed...
Reply
#3
That's the only report I've had and it works fine on all my hardware, so I am guessing it's an iOS exclusive issue.

I'll trac it.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with PIL on ATV2/iOS0