+
+
+class CoverFromFile(Cover):
+ def __init__(self, filename, *args, **kwargs):
+ super(CoverFromFile, self).__init__(*args, **kwargs)
+
+ self.background_img = filename
+
+ self.img = Image.open(filename)
+ (self.width, self.height) = self.img.size
+
+ self.format = path.splitext(filename)[-1][1:].upper()
+
+ def image(self):
+ return self.img