Make sure an image exists before trying to transform it

This commit is contained in:
Roberto Rosario
2015-06-09 20:23:40 -04:00
parent 0d6438d01a
commit 632656b8ce

View File

@@ -165,9 +165,15 @@ class ConverterBase(object):
pass
def transform(self, transformation):
if not self.image:
self.seek(0)
self.image = transformation.execute_on(self.image)
def transform_many(self, transformations):
if not self.image:
self.seek(0)
for transformation in transformations:
self.image = transformation.execute_on(self.image)