Comments (7)
This one can be closed now (#270).
from imageio.
I propose the following workflow:
- Implement an entry point named e.g.
imageio_download_binary
imageio_download_bin
for downloading the required binary. - Add the option
--package-dir
to the entry point which will download the binary to theplugins
recources
directory of the installed package. This directory can be determined withpkg_resources.recource_filename
(which also works with eggs), e.g.pkg_resources.resource_filename("imageio.plugins", imageio.plugins.ffmpeg.FNAME_PER_PLATFORM[imageio.plugins.ffmpeg.get_platform()])
. - Give the binary file in the plugins directory highest priority when calling the
get_exe
method. - For Pyinstaller, only a simple hooks script is required:
(needs pull request for PyInstaller)
# hook-imageio.py from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files('imageio')
This workflow as these advantages:
- It does not break the current behaviour
- Not many changes to the sources of imageio are required
- It allows to download binaries with a command line script
- On CIs such as appveyor or travisCI, it allows to easily build PyInstaller distributables with only the required binaries
from imageio.
Sounds like a plan. How do we deal with the fact that there are multiple binaries? Would you do e.g.
imageio_download_binary ffmpeg
?
from imageio.
Yes, that would be the usage of the entry point script. Did I oversee anything? I could start with a PR.
from imageio.
As far as I can see, this should work. Looking forward to a PR!
from imageio.
I have a question regarding the _set_platform_resources
method in setup.py
(used in build_with_fi
). What is the use-case of this method? Also, there are two lines dealing with ffmpeg commented out in _set_platform_resources
?
from imageio.
The purpose was to make it possible to build dists with the libraries packaged in. It's not used anymore though (at least not by me). The FFMPEG lines were added at some point, but then commented because it would make the dist package very large.
from imageio.
Related Issues (20)
- Support for Pillow v10.1 (re: setting `image.mode`) HOT 8
- Inconsistency when reading floating point .exr image file HOT 3
- imageio.imread changes the values of graycale pixels, try to read 12-bit png grayscale image. HOT 8
- super slow video reads HOT 6
- imageio v2.33.0 requieres Pillow>=9.1.0 for GIFs HOT 1
- Trouble using freeimage plugin on MacOS arm64 HOT 2
- 2.33.1: pytest is failing in 5 units HOT 1
- [Question] What tonemapping method does the imageio library use when reading HDR images? HOT 2
- title of the gif got stacked together HOT 2
- UnicodeDecodeError if metadata is not UTF-8 encoded (pyav plugin) HOT 3
- [request] more color/palette control on GIF writing HOT 3
- Transition from v2 ffmpeg read/write to v3 pyav read/write: quality, batching HOT 7
- AttributeError: 'SeekableFileObject' object has no attribute 'readline' HOT 1
- Find out what kwargs are available for each function
- Only partial DICOM layers loading in Google Colab using imageio.volread HOT 6
- How to suppress FFMPEG warning for BluRay files? HOT 1
- How to add a pause between loops of a GIF? HOT 1
- Wrong time unit in documentation of pillow_legacy
- support read gzip data in .nrrd file HOT 2
- can I get frame image filename in imiter when using ffmpeg plugin?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imageio.