-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3242 from tsennott/feature-imageops-colorize-thre…
…e-color Add feature: ImageOps.colorize to support three colors
- Loading branch information
Showing
6 changed files
with
220 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
5.3.0 | ||
----- | ||
|
||
API Changes | ||
=========== | ||
|
||
Deprecations | ||
^^^^^^^^^^^^ | ||
|
||
These version constants have been deprecated. ``VERSION`` will be removed in | ||
Pillow 6.0.0, and ``PILLOW_VERSION`` will be removed after that. | ||
|
||
* ``PIL.VERSION`` (old PIL version 1.1.7) | ||
* ``PIL.PILLOW_VERSION`` | ||
* ``PIL.Image.VERSION`` | ||
* ``PIL.Image.PILLOW_VERSION`` | ||
|
||
Use ``PIL.__version__`` instead. | ||
|
||
API Additions | ||
============= | ||
|
||
ImageOps.colorize | ||
^^^^^^^^^^^^^^^^^ | ||
|
||
Previously ``ImageOps.colorize`` only supported two-color mapping with | ||
``black`` and ``white`` arguments being mapped to 0 and 255 respectively. | ||
Now it supports three-color mapping with the optional ``mid`` parameter, and | ||
the positions for all three color arguments can each be optionally specified | ||
(``blackpoint``, ``whitepoint`` and ``midpoint``). | ||
For example, with all optional arguments:: | ||
ImageOps.colorize(im, black=(32, 37, 79), white='white', mid=(59, 101, 175), | ||
blackpoint=15, whitepoint=240, midpoint=100) | ||
|
||
|
||
|
||
Other Changes | ||
============= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ Release Notes | |
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
5.3.0 | ||
5.2.0 | ||
5.1.0 | ||
5.0.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters