Skip to content

Commit 7579183

Browse files
committed
Updated code to match other plugins
1 parent 45c4ba7 commit 7579183

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/PIL/GbrImagePlugin.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,12 @@ def _open(self):
8484
self._data_size = width * height * color_depth
8585

8686
def load(self):
87-
if not self.im:
88-
self.im = Image.core.new(self.mode, self.size)
89-
self.frombytes(self.fp.read(self._data_size))
87+
if self.im:
88+
# Already loaded
89+
return
90+
91+
self.im = Image.core.new(self.mode, self.size)
92+
self.frombytes(self.fp.read(self._data_size))
9093

9194

9295
#

0 commit comments

Comments
 (0)