Open lvonlanthen opened 1 year ago
Without this fix, program fails like
$ python ./helloworld-dzi.py
Traceback (most recent call last):
File "C:\github\deepzoom.py\examples\helloworld\helloworld-dzi.py", line 5, in <module>
import deepzoom
File "C:\github\deepzoom.py\venv\lib\site-packages\deepzoomtools-2.0.0-py3.10.egg\deepzoom\__init__.py", line 57, in <module>
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
With it it still failed
$ python ./helloworld-dzi.py
Traceback (most recent call last):
File "C:\Python310\lib\urllib\request.py", line 1505, in open_local_file
stats = os.stat(localfile)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\github\deepzoom.py\examples\helloworld\helloworld-dzi.py", line 20, in <module>
creator.create(SOURCE, "output/helloworld.dzi")
File "C:\github\deepzoom.py\venv\lib\site-packages\deepzoomtools-2.0.0-py3.10.egg\deepzoom\__init__.py", line 422, in create
File "C:\github\deepzoom.py\venv\lib\site-packages\deepzoomtools-2.0.0-py3.10.egg\deepzoom\__init__.py", line 508, in f_retry
File "C:\github\deepzoom.py\venv\lib\site-packages\deepzoomtools-2.0.0-py3.10.egg\deepzoom\__init__.py", line 504, in f_retry
File "C:\github\deepzoom.py\venv\lib\site-packages\deepzoomtools-2.0.0-py3.10.egg\deepzoom\__init__.py", line 547, in safe_open
File "C:\Python310\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Python310\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
File "C:\Python310\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Python310\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Python310\lib\urllib\request.py", line 1483, in file_open
return self.open_local_file(req)
File "C:\Python310\lib\urllib\request.py", line 1522, in open_local_file
raise URLError(exp)
urllib.error.URLError: <urlopen error [WinError 3] The system cannot find the path specified: ''>
but at least it is a step in the right direction.
With Pillow 10.0.0,
PIL.Image.CUBIC
andPIL.Image.ANTIALIAS
were removed. Instead,PIL.Image.BICUBIC
andPIL.Image.LANCZOS
respectively should be used.