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,9 +84,12 @@ 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:
self.im = Image.core.new(self.mode, self.size) # Already loaded
self.frombytes(self.fp.read(self._data_size)) return
self.im = Image.core.new(self.mode, self.size)
self.frombytes(self.fp.read(self._data_size))
# #