2012-03-12, 07:54
Hi Bossanova..
Here is what I think you are after...? attached as requested.?
Regards
Jolly
Here is what I think you are after...? attached as requested.?
Regards
Jolly
#download the backgrounds only if we don't have them yet
if not xbmcvfs.exists( radarBackgroundsPath + fileName):
#the legened image showing the rain scale
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)
#try REALLY hard to get at least the background image
try:
#ok so something is wrong with image conversion - probably a PIL issue, so let's just get a minimal BG image
if "background.png" in fileName:
if not '00004' in fileName:
image.retrieve(ftpStub + fileName, imageFileRGB )
else:
#national radar loop uses a different BG for some reason...
image.retrieve(ftpStub + 'IDE00035.background.png', imageFileRGB )
except Exception as inst2:
log("No, really, -> Error, couldn't retrieve " + fileName + " - error: ", inst2)