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

empty "graphics" in JSON causes PIL error #4

Open
max-vogler opened this issue Oct 2, 2023 · 0 comments
Open

empty "graphics" in JSON causes PIL error #4

max-vogler opened this issue Oct 2, 2023 · 0 comments

Comments

@max-vogler
Copy link
Contributor

If map.json has no graphics:

{
  "graphics": [],
  "objects": [],
  "tiles": ["collision"]
}

butano-tiled throws an error:

Traceback (most recent call last):
  File "/utano-tiled/bntmx.py", line 293, in <module>
    process(args.mapsdirs, args.build)
  File "butano-tiled/bntmx.py", line 267, in process
    gfx_im.save(bmp_filename, "BMP")
  File "/usr/local/lib/python3.11/site-packages/PIL/Image.py", line 2431, in save
    save_handler(self, fp, filename)
  File "/usr/local/lib/python3.11/site-packages/PIL/BmpImagePlugin.py", line 451, in _save
    ImageFile._save(im, fp, [("raw", (0, 0) + im.size, 0, (rawmode, stride, -1))])
  File "/usr/local/lib/python3.11/site-packages/PIL/ImageFile.py", line 520, in _save
    _encode_tile(im, fp, tile, bufsize, fh)
  File "/usr/local/lib/python3.11/site-packages/PIL/ImageFile.py", line 533, in _encode_tile
    encoder.setimage(im.im, b)
SystemError: tile cannot extend outside image
make: *** [all] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant