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
def load(self):
if not self.im:
self.im = Image.core.new(self.mode, self.size)
self.frombytes(self.fp.read(self._data_size))
if self.im:
# Already loaded
return
self.im = Image.core.new(self.mode, self.size)
self.frombytes(self.fp.read(self._data_size))
#