Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use consistent arguments for load_read and load_seek #7713

Merged
merged 2 commits into from Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/PIL/EpsImagePlugin.py
Expand Up @@ -408,7 +408,7 @@ def load(self, scale=1, transparency=False):
self.tile = []
return Image.Image.load(self)

def load_seek(self, *args, **kwargs):
def load_seek(self, pos):
# we can't incrementally load, so force ImageFile.parser to
# use our custom load method by defining this method.
pass
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/IcoImagePlugin.py
Expand Up @@ -339,7 +339,7 @@ def load(self):

self.size = im.size

def load_seek(self):
def load_seek(self, pos):
# Flag the ImageFile.Parser so that it
# just does all the decode at the end.
pass
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFile.py
Expand Up @@ -328,7 +328,7 @@ def load_end(self):
# pass

# may be defined for blocked formats (e.g. PNG)
# def load_read(self, bytes):
# def load_read(self, read_bytes):
# pass

def _seek_check(self, frame):
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/XpmImagePlugin.py
Expand Up @@ -103,7 +103,7 @@ def _open(self):

self.tile = [("raw", (0, 0) + self.size, self.fp.tell(), ("P", 0, 1))]

def load_read(self, bytes):
def load_read(self, read_bytes):
#
# load all image data in one chunk

Expand Down