mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-06 21:40:09 +03:00
Python Imaging Library (Fork)
The function can be optimized by pre-calculating the histogram and its length, using enumerate for iterating over `self.bands` instead of using indexing, and utilizing iterator in the inner loop for faster execution. In this version of the code, the `for` loop is replaced with `enumerate` enumeration that creates a counter for every iteration making the code run faster. Furthermore, to make sure we do not overflow the histogram array, we use `min` function when slicing it. These changes result in a faster execution because Python's enumerate function is more efficient in terms of CPU usage compared to normal iteration, and it avoids the use of an extra index variable. Memory usage is also optimized because we are avoiding creating additional variables and lists unnecessarily. |
||
---|---|---|
_custom_build | ||
.ci | ||
.github | ||
depends | ||
docs | ||
src | ||
Tests | ||
wheels | ||
winbuild | ||
.appveyor.yml | ||
.clang-format | ||
.coveragerc | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.pre-commit-config.yaml | ||
.readthedocs.yml | ||
CHANGES.rst | ||
codecov.yml | ||
conftest.py | ||
LICENSE | ||
Makefile | ||
MANIFEST.in | ||
pyproject.toml | ||
README.md | ||
RELEASING.md | ||
selftest.py | ||
setup.py | ||
tox.ini |
Pillow
Python Imaging Library (Fork)
Pillow is the friendly PIL fork by Jeffrey A. Clark (Alex) and contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift.
docs |
|
---|---|
tests |
|
package |
|
social |
|
Overview
The Python Imaging Library adds image processing capabilities to your Python interpreter.
This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.
The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool.
More Information
Report a Vulnerability
To report a security vulnerability, please follow the procedure described in the Tidelift security policy.