mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
expose ImageCms.core.CmsTransform
This commit is contained in:
parent
047a0d2a64
commit
0015e9ce68
|
@ -522,6 +522,15 @@ def test_profile_typesafety() -> None:
|
||||||
ImageCms.core.CmsProfile(0)
|
ImageCms.core.CmsProfile(0)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(is_pypy(), reason="fails on PyPy")
|
||||||
|
def test_transform_typesafety() -> None:
|
||||||
|
# core transform should not be directly instantiable
|
||||||
|
with pytest.raises(TypeError):
|
||||||
|
ImageCms.core.CmsProfile()
|
||||||
|
with pytest.raises(TypeError):
|
||||||
|
ImageCms.core.CmsProfile(0)
|
||||||
|
|
||||||
|
|
||||||
def assert_aux_channel_preserved(
|
def assert_aux_channel_preserved(
|
||||||
mode: str, transform_in_place: bool, preserved_channel: str
|
mode: str, transform_in_place: bool, preserved_channel: str
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
|
@ -1518,6 +1518,9 @@ setup_module(PyObject *m) {
|
||||||
Py_INCREF(&CmsProfile_Type);
|
Py_INCREF(&CmsProfile_Type);
|
||||||
PyModule_AddObject(m, "CmsProfile", (PyObject *)&CmsProfile_Type);
|
PyModule_AddObject(m, "CmsProfile", (PyObject *)&CmsProfile_Type);
|
||||||
|
|
||||||
|
Py_INCREF(&CmsTransform_Type);
|
||||||
|
PyModule_AddObject(m, "CmsTransform", (PyObject *)&CmsTransform_Type);
|
||||||
|
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
|
|
||||||
/* this check is also in PIL.features.pilinfo() */
|
/* this check is also in PIL.features.pilinfo() */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user