Skip to content

Commit

Permalink
Added default value for _Tile offset
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 13, 2024
1 parent 871963b commit 84f5c7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/PIL/EpsImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes, eps: int = 1) -
if hasattr(fp, "flush"):
fp.flush()

ImageFile._save(im, fp, [ImageFile._Tile("eps", (0, 0) + im.size, 0)])
ImageFile._save(im, fp, [ImageFile._Tile("eps", (0, 0) + im.size)])

fp.write(b"\n%%%%EndBinary\n")
fp.write(b"grestore end\n")
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _tilesort(t: _Tile) -> int:
class _Tile(NamedTuple):
codec_name: str
extents: tuple[int, int, int, int] | None
offset: int
offset: int = 0
args: tuple[Any, ...] | str | None = None


Expand Down
2 changes: 1 addition & 1 deletion src/PIL/XbmImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:

fp.write(b"static char im_bits[] = {\n")

ImageFile._save(im, fp, [ImageFile._Tile("xbm", (0, 0) + im.size, 0)])
ImageFile._save(im, fp, [ImageFile._Tile("xbm", (0, 0) + im.size)])

fp.write(b"};\n")

Expand Down

0 comments on commit 84f5c7e

Please sign in to comment.