Updated code to match other plugins

This commit is contained in:
Andrew Murray 2020-05-17 11:08:05 +10:00
parent 45c4ba7a5f
commit 75791835b3

View File

@ -84,7 +84,10 @@ class GbrImageFile(ImageFile.ImageFile):
self._data_size = width * height * color_depth self._data_size = width * height * color_depth
def load(self): def load(self):
if not self.im: if self.im:
# Already loaded
return
self.im = Image.core.new(self.mode, self.size) self.im = Image.core.new(self.mode, self.size)
self.frombytes(self.fp.read(self._data_size)) self.frombytes(self.fp.read(self._data_size))