CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
_imagingcms.pyi144 linesDownload Raw Back to PIL
1import datetime
2import sys
3from typing import Literal, SupportsFloat, TypeAlias, TypedDict
4
5from ._typing import CapsuleType
6
7littlecms_version: str | None
8
9_Tuple3f: TypeAlias = tuple[float, float, float]
10_Tuple2x3f: TypeAlias = tuple[_Tuple3f, _Tuple3f]
11_Tuple3x3f: TypeAlias = tuple[_Tuple3f, _Tuple3f, _Tuple3f]
12
13class _IccMeasurementCondition(TypedDict):
14    observer: int
15    backing: _Tuple3f
16    geo: str
17    flare: float
18    illuminant_type: str
19
20class _IccViewingCondition(TypedDict):
21    illuminant: _Tuple3f
22    surround: _Tuple3f
23    illuminant_type: str
24
25class CmsProfile:
26    @property
27    def rendering_intent(self) -> int: ...
28    @property
29    def creation_date(self) -> datetime.datetime | None: ...
30    @property
31    def copyright(self) -> str | None: ...
32    @property
33    def target(self) -> str | None: ...
34    @property
35    def manufacturer(self) -> str | None: ...
36    @property
37    def model(self) -> str | None: ...
38    @property
39    def profile_description(self) -> str | None: ...
40    @property
41    def screening_description(self) -> str | None: ...
42    @property
43    def viewing_condition(self) -> str | None: ...
44    @property
45    def version(self) -> float: ...
46    @property
47    def icc_version(self) -> int: ...
48    @property
49    def attributes(self) -> int: ...
50    @property
51    def header_flags(self) -> int: ...
52    @property
53    def header_manufacturer(self) -> str: ...
54    @property
55    def header_model(self) -> str: ...
56    @property
57    def device_class(self) -> str: ...
58    @property
59    def connection_space(self) -> str: ...
60    @property
61    def xcolor_space(self) -> str: ...
62    @property
63    def profile_id(self) -> bytes: ...
64    @property
65    def is_matrix_shaper(self) -> bool: ...
66    @property
67    def technology(self) -> str | None: ...
68    @property
69    def colorimetric_intent(self) -> str | None: ...
70    @property
71    def perceptual_rendering_intent_gamut(self) -> str | None: ...
72    @property
73    def saturation_rendering_intent_gamut(self) -> str | None: ...
74    @property
75    def red_colorant(self) -> _Tuple2x3f | None: ...
76    @property
77    def green_colorant(self) -> _Tuple2x3f | None: ...
78    @property
79    def blue_colorant(self) -> _Tuple2x3f | None: ...
80    @property
81    def red_primary(self) -> _Tuple2x3f | None: ...
82    @property
83    def green_primary(self) -> _Tuple2x3f | None: ...
84    @property
85    def blue_primary(self) -> _Tuple2x3f | None: ...
86    @property
87    def media_white_point_temperature(self) -> float | None: ...
88    @property
89    def media_white_point(self) -> _Tuple2x3f | None: ...
90    @property
91    def media_black_point(self) -> _Tuple2x3f | None: ...
92    @property
93    def luminance(self) -> _Tuple2x3f | None: ...
94    @property
95    def chromatic_adaptation(self) -> tuple[_Tuple3x3f, _Tuple3x3f] | None: ...
96    @property
97    def chromaticity(self) -> _Tuple3x3f | None: ...
98    @property
99    def colorant_table(self) -> list[str] | None: ...
100    @property
101    def colorant_table_out(self) -> list[str] | None: ...
102    @property
103    def intent_supported(self) -> dict[int, tuple[bool, bool, bool]] | None: ...
104    @property
105    def clut(self) -> dict[int, tuple[bool, bool, bool]] | None: ...
106    @property
107    def icc_measurement_condition(self) -> _IccMeasurementCondition | None: ...
108    @property
109    def icc_viewing_condition(self) -> _IccViewingCondition | None: ...
110    def is_intent_supported(self, intent: int, direction: int, /) -> int: ...
111
112class CmsTransform:
113    def apply(self, id_in: CapsuleType, id_out: CapsuleType) -> int: ...
114
115def profile_open(profile: str, /) -> CmsProfile: ...
116def profile_frombytes(profile: bytes, /) -> CmsProfile: ...
117def profile_tobytes(profile: CmsProfile, /) -> bytes: ...
118def buildTransform(
119    input_profile: CmsProfile,
120    output_profile: CmsProfile,
121    in_mode: str,
122    out_mode: str,
123    rendering_intent: int = 0,
124    cms_flags: int = 0,
125    /,
126) -> CmsTransform: ...
127def buildProofTransform(
128    input_profile: CmsProfile,
129    output_profile: CmsProfile,
130    proof_profile: CmsProfile,
131    in_mode: str,
132    out_mode: str,
133    rendering_intent: int = 0,
134    proof_intent: int = 0,
135    cms_flags: int = 0,
136    /,
137) -> CmsTransform: ...
138def createProfile(
139    color_space: Literal["LAB", "XYZ", "sRGB"], color_temp: SupportsFloat = 0.0, /
140) -> CmsProfile: ...
141
142if sys.platform == "win32":
143    def get_display_profile_win32(handle: int = 0, is_dc: int = 0, /) -> str | None: ...
144 
Aluode/PerceptionLabPortable · CoolFace