GregoryAM-SP / The-Minecraft-Overviewer

The Minecraft Overviewer | Successor
https://overviewer.gregoryam.com
GNU General Public License v3.0
100 stars 13 forks source link

feat: update pillow version to 10.0.0 #12

Closed johann-lecocq closed 1 year ago

johann-lecocq commented 1 year ago

In Pillow 10.0.0 ANTIALIAS constant was replaced by Image.LANCZOS or Image.Resampling.LANCZOS.

https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#constants

Gregory-AM commented 1 year ago

I'll need to look into this. Was this something you found out recently when attempting to build Overviewer from source?

johann-lecocq commented 1 year ago

Hi, I tested the project yesterday, no problems compiling from source. Only at runtime, I get this exception

2023-08-07 18:40:03  Welcome to Minecraft Overviewer version v1.20.1 (d83f392)!
2023-08-07 18:40:03  Generating textures...
2023-08-07 18:40:03 E An error has occurred. This may be a bug. Please let us know!
See http://docs.overviewer.org/en/latest/index.html#help

This is the error that occurred:
Traceback (most recent call last):
  File "/home/johann/programmation/source/jeux/config-minecraft-map/./The-Minecraft-Overviewer/overviewer.py", line 653, in <module>
    ret = main()
          ^^^^^^
  File "/home/johann/programmation/source/jeux/config-minecraft-map/./The-Minecraft-Overviewer/overviewer.py", line 505, in main
    tex.generate()
  File "/home/johann/programmation/source/jeux/config-minecraft-map/The-Minecraft-Overviewer/overviewer_core/textures.py", line 136, in generate
    self.biome_grass_texture = self.build_block(self.load_image_texture(BLOCKTEXTURE + "grass_block_top.png"), self.load_image_texture(BLOCKTEXTURE + "grass_block_side_overlay.png"))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/johann/programmation/source/jeux/config-minecraft-map/The-Minecraft-Overviewer/overviewer_core/textures.py", line 580, in build_block
    top = self.transform_image_top(top)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/johann/programmation/source/jeux/config-minecraft-map/The-Minecraft-Overviewer/overviewer_core/textures.py", line 476, in transform_image_top
    img = img.resize((17, 17), Image.ANTIALIAS)
                               ^^^^^^^^^^^^^^^
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

I am under Archlinux and the last version of Pillow package is 10.0.0

Gregory-AM commented 1 year ago

I went ahead and added this into Overviewer, a new build will be coming out in a few hours. Since this didn't pose an issue with my current version of Pillow, I didn't see this issue.

After reinstalling an older version of Python and having to reinstall the Packages (Numpy & Pillow). I ran into this issue.