Closed tnTano closed 6 months ago
@tnTano Hi, i ran into the same error. The problems seems to arise from the Python-package "Pillow" (PIL) which deprecated the "ANTIALIAS" attribute on images from version 10 onward. If its any help to you, here's how I fixed it: uninstall Pillow version 10 ("pip uninstall Pillow") and re-install a specific version before version 10 (I used Pillow version 9.5.0 and simple photo gallery worked fine). Command to install 9.5.0 is: pip install Pillow==9.5.0
Thanks, it's works!!!On Jul 24, 2023, at 11:38 AM, BBSiteUser @.> @. Hi, i ran into the same error. The problems seems to arise from the Python-package "Pillow" (PIL) which deprecated the "ANTIALIAS" attribute on images from version 10 onward. If its any help to you, here's how I fixed it: uninstall Pillow version 10 ("pip uninstall Pillow") and re-install a specific version before version 10 (I used Pillow version 9.5.0 and simple photo gallery worked fine). Command to install 9.5.0 is: pip install Pillow==9.5.0—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
For those of us who do not manage Python through pip, but rather the package manager of a distro that does not support downgrading... How long till simple-photo-gallery changes this function usage in favor of the one not deprecated? Pillow (PIL) has dropped ANTIALIAS since version 10...
A simple fix: the value ANTIALIAS = 1 , and is equivalent to LANCZOS = 1. This is documented in PIL near the top.
The offending piece of code is in media.py in your local simple-photo-gallery source directory. Change ANTIALIAS to LANCSOS
eg:
In media.py change:
image = image.resize(thumbnail_size, Image.ANTIALIAS)
to
image = image.resize(thumbnail_size, Image.LANCSOS) #or simply use the value 1
Worked for me.
Hi, when i try to run
gallery-build
in WSL (after succesfully run 'gallery-init' i receive this outputBuilding the Simple Photo Gallery... Generating thumbnails... Something went wrong while generating the thumbnails: module 'PIL.Image' has no attribute 'ANTIALIAS'
and i not able to complete the creation of my gallery...
thanks for your help
ps: i installed this tool today so i'm with the latest version...