mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-14 21:56:56 +03:00
Python Imaging Library (Fork)
75205f0a50
The existing 16-bit RGB rawmodes do not follow the naming convention given in Unpack.c. These new modes do follow that convention, except since these modes do not all use the same number of bits for each band, the sizes of each band are listed. Old → New RGB;15 → XBGR;1555 RGB;16 → BGR;565 BGR;5 → XRGB;1555 BGR;15 → XRGB;1555 BGR;16 → RGB;565 RGB;4B → XBGR;4 RGBA;4B → ABGR;4 RGBA;15 → ABGR;1555 BGRA;15 → ARGB;1555 BGRA;15Z → ARGB;1555Z These new rawmodes also use a slightly different conversion method. The most accurate conversion from 5 to 8 bits is "round(x * 255 / 31.0)". However, that involves floating point numbers and rounding, so it's not as fast. The current method doesn't include the rounding, allowing us to also use integer instead of floating point division. This is faster, but unfortunately not roundtrippable - when converting from 5 to 8 to 5 bits not every value stays the same. The new method is roundtrippable, even faster than the current method since it uses basic bitwise operations instead of multiplication and division, and if you compare the result to what you get with rounding and floating point numbers, it is actually more accurate. |
||
---|---|---|
_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 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.