fdintino / pillow-avif-plugin

A pillow plugin that adds avif support via libavif
BSD 2-Clause "Simplified" License
90 stars 13 forks source link

Fix zlib 1.2.11 download link invalid, update to 1.2.13 #22

Closed gamefunc closed 1 year ago

gamefunc commented 1 year ago

build successfully test env: win 10 x64; cl 19.35.32215; python 3.11.2; build cmd: cd path\pillow-avif-plugin-1.3.1\winbuild python3 build_prepare.py cd path\pillow-avif-plugin-1.3.1\winbuild\build build_dep_all.cmd

install_pillow.cmd

# install_meson.cmd
build_pillow_avif_plugin.cmd
python setup.py install

use:
import PIL.Image import pillow_avif img = PIL.Image.open("path/img_name.avif")

MI2-2 commented 1 year ago

Thank you. Build was succsess.

but can not install pillow-avif-plugin when "python setup.py install"

'avif/avif.h':No such file or directory

env: Win11 x64, Python 3.11

gamefunc commented 1 year ago

Thank you. Build was succsess.

but can not install pillow-avif-plugin when "python setup.py install"

'avif/avif.h':No such file or directory

env: Win11 x64, Python 3.11

I have not encountered your situation; win build script is winbuild/build_prepare.py; this script will do: 1: Download zlib, libpng, libjpeg, libavif, source code .tar.gz, and extract them to the build directory; 2: Create some .bat for building(just create xx.bat, it not auto run that.bat);

So we need to manually run build.cmd to build the dependent library, After we run build_dep_all.cmd, it will build the above 4 libraries and put them to the specified location. after we run build_pillow_avif_plugin.cmd, then cd to the "setup.py" directory and run "python3 setup.py install", it will auto install xx.egg;

Your reason may be: 1: Visual studio not installed, my vs ver is 2022(build lib need msvc); 2: You did not build the 4 dependent libraries successfully(build_dep_all.cmd); 3: Pillow or meson is not installed;

build_dep_all.bat will also copy the successfully built xx.lib, xx.h to the specified directory, The pillow_avif_plugin build/install will look these directories;

fdintino commented 1 year ago

Thank you for this fix!