1 from enigma import loadPNG, loadJPG
5 def LoadPixmap(path, desktop = None, cached = False):
6 if path in pixmap_cache:
7 return pixmap_cache[path]
9 if path[-4:] == ".png":
11 elif path[-4:] == ".jpg":
13 elif path[-1:] == ".":
14 alpha = loadPNG(path + "a.png")
15 ptr = loadJPG(path + "rgb.jpg", alpha)
17 raise "neither .png nor .jpg, please fix file extension"
19 desktop.makeCompatiblePixmap(ptr)
22 pixmap_cache[path] = ptr