mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 13:40:54 +03:00
document ImageCms.Flags
This commit is contained in:
parent
26b2aa5165
commit
0b2e2b224f
|
@ -27,6 +27,10 @@ Constants
|
||||||
:members:
|
:members:
|
||||||
:member-order: bysource
|
:member-order: bysource
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
|
.. autoclass:: Flags
|
||||||
|
:members:
|
||||||
|
:member-order: bysource
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
Functions
|
Functions
|
||||||
---------
|
---------
|
||||||
|
|
|
@ -123,26 +123,43 @@ class Direction(IntEnum):
|
||||||
|
|
||||||
|
|
||||||
class Flags(IntFlag):
|
class Flags(IntFlag):
|
||||||
# These are taken from lcms2.h (including comments)
|
"""Flags and documentation are taken from ``lcms2.h``."""
|
||||||
|
|
||||||
NONE = 0
|
NONE = 0
|
||||||
NOCACHE = 0x0040 # Inhibit 1-pixel cache
|
NOCACHE = 0x0040
|
||||||
NOOPTIMIZE = 0x0100 # Inhibit optimizations
|
"""Inhibit 1-pixel cache"""
|
||||||
NULLTRANSFORM = 0x0200 # Don't transform anyway
|
NOOPTIMIZE = 0x0100
|
||||||
GAMUTCHECK = 0x1000 # Out of Gamut alarm
|
"""Inhibit optimizations"""
|
||||||
SOFTPROOFING = 0x4000 # Do softproofing
|
NULLTRANSFORM = 0x0200
|
||||||
|
"""Don't transform anyway"""
|
||||||
|
GAMUTCHECK = 0x1000
|
||||||
|
"""Out of Gamut alarm"""
|
||||||
|
SOFTPROOFING = 0x4000
|
||||||
|
"""Do softproofing"""
|
||||||
BLACKPOINTCOMPENSATION = 0x2000
|
BLACKPOINTCOMPENSATION = 0x2000
|
||||||
NOWHITEONWHITEFIXUP = 0x0004 # Don't fix scum dot
|
NOWHITEONWHITEFIXUP = 0x0004
|
||||||
HIGHRESPRECALC = 0x0400 # Use more memory to give better accuracy
|
"""Don't fix scum dot"""
|
||||||
LOWRESPRECALC = 0x0800 # Use less memory to minimize resources
|
HIGHRESPRECALC = 0x0400
|
||||||
|
"""Use more memory to give better accuracy"""
|
||||||
|
LOWRESPRECALC = 0x0800
|
||||||
|
"""Use less memory to minimize resources"""
|
||||||
# this should be 8BITS_DEVICELINK, but that is not a valid name in Python:
|
# this should be 8BITS_DEVICELINK, but that is not a valid name in Python:
|
||||||
USE_8BITS_DEVICELINK = 0x0008 # Create 8 bits devicelinks
|
USE_8BITS_DEVICELINK = 0x0008
|
||||||
GUESSDEVICECLASS = 0x0020 # Guess device class (for transform2devicelink)
|
"""Create 8 bits devicelinks"""
|
||||||
KEEP_SEQUENCE = 0x0080 # Keep profile sequence for devicelink creation
|
GUESSDEVICECLASS = 0x0020
|
||||||
FORCE_CLUT = 0x0002 # Force CLUT optimization
|
"""Guess device class (for transform2devicelink)"""
|
||||||
CLUT_POST_LINEARIZATION = 0x0001 # create postlinearization tables if possible
|
KEEP_SEQUENCE = 0x0080
|
||||||
CLUT_PRE_LINEARIZATION = 0x0010 # create prelinearization tables if possible
|
"""Keep profile sequence for devicelink creation"""
|
||||||
NONEGATIVES = 0x8000 # Prevent negative numbers in floating point transforms
|
FORCE_CLUT = 0x0002
|
||||||
COPY_ALPHA = 0x04000000 # Alpha channels are copied on cmsDoTransform()
|
"""Force CLUT optimization"""
|
||||||
|
CLUT_POST_LINEARIZATION = 0x0001
|
||||||
|
"""create postlinearization tables if possible"""
|
||||||
|
CLUT_PRE_LINEARIZATION = 0x0010
|
||||||
|
"""create prelinearization tables if possible"""
|
||||||
|
NONEGATIVES = 0x8000
|
||||||
|
"""Prevent negative numbers in floating point transforms"""
|
||||||
|
COPY_ALPHA = 0x04000000
|
||||||
|
"""Alpha channels are copied on cmsDoTransform()"""
|
||||||
NODEFAULTRESOURCEDEF = 0x01000000
|
NODEFAULTRESOURCEDEF = 0x01000000
|
||||||
|
|
||||||
_GRIDPOINTS_1 = 1 << 16
|
_GRIDPOINTS_1 = 1 << 16
|
||||||
|
@ -156,7 +173,11 @@ class Flags(IntFlag):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def GRIDPOINTS(n: int) -> Flags:
|
def GRIDPOINTS(n: int) -> Flags:
|
||||||
# Fine-tune control over number of gridpoints
|
"""
|
||||||
|
Fine-tune control over number of gridpoints
|
||||||
|
|
||||||
|
:param n: :py:class:`int` in range ``0 <= n <= 255``
|
||||||
|
"""
|
||||||
return Flags.NONE | ((n & 0xFF) << 16)
|
return Flags.NONE | ((n & 0xFF) << 16)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user