Skip to content

Commit

Permalink
Rebase and reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Aug 3, 2020
1 parent 7862e75 commit a2d204a
Showing 1 changed file with 53 additions and 54 deletions.
107 changes: 53 additions & 54 deletions src/_imagingcms.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,9 +983,8 @@ static struct PyMethodDef cms_profile_methods[] = {
{NULL, NULL} /* sentinel */
};

static PyObject*
cms_profile_getattr_rendering_intent(CmsProfileObject* self, void* closure)
{
static PyObject *
cms_profile_getattr_rendering_intent(CmsProfileObject *self, void *closure) {
return PyLong_FromLong(cmsGetHeaderRenderingIntent(self->profile));
}

Expand Down Expand Up @@ -1081,15 +1080,13 @@ cms_profile_getattr_device_class(CmsProfileObject *self, void *closure) {
return _profile_read_int_as_string(cmsGetDeviceClass(self->profile));
}

static PyObject*
cms_profile_getattr_connection_space(CmsProfileObject* self, void* closure)
{
static PyObject *
cms_profile_getattr_connection_space(CmsProfileObject *self, void *closure) {
return _profile_read_int_as_string(cmsGetPCS(self->profile));
}

static PyObject*
cms_profile_getattr_xcolor_space(CmsProfileObject* self, void* closure)
{
static PyObject *
cms_profile_getattr_xcolor_space(CmsProfileObject *self, void *closure) {
return _profile_read_int_as_string(cmsGetColorSpace(self->profile));
}

Expand Down Expand Up @@ -1379,52 +1376,54 @@ cms_profile_getattr_icc_viewing_condition(CmsProfileObject *self, void *closure)

static struct PyGetSetDef cms_profile_getsetters[] = {
/* New style interfaces. */
{ "rendering_intent", (getter) cms_profile_getattr_rendering_intent },
{ "creation_date", (getter) cms_profile_getattr_creation_date },
{ "copyright", (getter) cms_profile_getattr_copyright },
{ "target", (getter) cms_profile_getattr_target },
{ "manufacturer", (getter) cms_profile_getattr_manufacturer },
{ "model", (getter) cms_profile_getattr_model },
{ "profile_description", (getter) cms_profile_getattr_profile_description },
{ "screening_description", (getter) cms_profile_getattr_screening_description },
{ "viewing_condition", (getter) cms_profile_getattr_viewing_condition },
{ "version", (getter) cms_profile_getattr_version },
{ "icc_version", (getter) cms_profile_getattr_icc_version },
{ "attributes", (getter) cms_profile_getattr_attributes },
{ "header_flags", (getter) cms_profile_getattr_header_flags },
{ "header_manufacturer", (getter) cms_profile_getattr_header_manufacturer },
{ "header_model", (getter) cms_profile_getattr_header_model },
{ "device_class", (getter) cms_profile_getattr_device_class },
{ "connection_space", (getter) cms_profile_getattr_connection_space },
{ "xcolor_space", (getter) cms_profile_getattr_xcolor_space },
{ "profile_id", (getter) cms_profile_getattr_profile_id },
{ "is_matrix_shaper", (getter) cms_profile_getattr_is_matrix_shaper },
{ "technology", (getter) cms_profile_getattr_technology },
{ "colorimetric_intent", (getter) cms_profile_getattr_colorimetric_intent },
{ "perceptual_rendering_intent_gamut", (getter) cms_profile_getattr_perceptual_rendering_intent_gamut },
{ "saturation_rendering_intent_gamut", (getter) cms_profile_getattr_saturation_rendering_intent_gamut },
{ "red_colorant", (getter) cms_profile_getattr_red_colorant },
{ "green_colorant", (getter) cms_profile_getattr_green_colorant },
{ "blue_colorant", (getter) cms_profile_getattr_blue_colorant },
{ "red_primary", (getter) cms_profile_getattr_red_primary },
{ "green_primary", (getter) cms_profile_getattr_green_primary },
{ "blue_primary", (getter) cms_profile_getattr_blue_primary },
{ "media_white_point_temperature", (getter) cms_profile_getattr_media_white_point_temperature },
{ "media_white_point", (getter) cms_profile_getattr_media_white_point },
{ "media_black_point", (getter) cms_profile_getattr_media_black_point },
{ "luminance", (getter) cms_profile_getattr_luminance },
{ "chromatic_adaptation", (getter) cms_profile_getattr_chromatic_adaptation },
{ "chromaticity", (getter) cms_profile_getattr_chromaticity },
{ "colorant_table", (getter) cms_profile_getattr_colorant_table },
{ "colorant_table_out", (getter) cms_profile_getattr_colorant_table_out },
{ "intent_supported", (getter) cms_profile_getattr_is_intent_supported },
{ "clut", (getter) cms_profile_getattr_is_clut },
{ "icc_measurement_condition", (getter) cms_profile_getattr_icc_measurement_condition },
{ "icc_viewing_condition", (getter) cms_profile_getattr_icc_viewing_condition },

{ NULL }
};
{"rendering_intent", (getter)cms_profile_getattr_rendering_intent},
{"creation_date", (getter)cms_profile_getattr_creation_date},
{"copyright", (getter)cms_profile_getattr_copyright},
{"target", (getter)cms_profile_getattr_target},
{"manufacturer", (getter)cms_profile_getattr_manufacturer},
{"model", (getter)cms_profile_getattr_model},
{"profile_description", (getter)cms_profile_getattr_profile_description},
{"screening_description", (getter)cms_profile_getattr_screening_description},
{"viewing_condition", (getter)cms_profile_getattr_viewing_condition},
{"version", (getter)cms_profile_getattr_version},
{"icc_version", (getter)cms_profile_getattr_icc_version},
{"attributes", (getter)cms_profile_getattr_attributes},
{"header_flags", (getter)cms_profile_getattr_header_flags},
{"header_manufacturer", (getter)cms_profile_getattr_header_manufacturer},
{"header_model", (getter)cms_profile_getattr_header_model},
{"device_class", (getter)cms_profile_getattr_device_class},
{"connection_space", (getter)cms_profile_getattr_connection_space},
{"xcolor_space", (getter)cms_profile_getattr_xcolor_space},
{"profile_id", (getter)cms_profile_getattr_profile_id},
{"is_matrix_shaper", (getter)cms_profile_getattr_is_matrix_shaper},
{"technology", (getter)cms_profile_getattr_technology},
{"colorimetric_intent", (getter)cms_profile_getattr_colorimetric_intent},
{"perceptual_rendering_intent_gamut",
(getter)cms_profile_getattr_perceptual_rendering_intent_gamut},
{"saturation_rendering_intent_gamut",
(getter)cms_profile_getattr_saturation_rendering_intent_gamut},
{"red_colorant", (getter)cms_profile_getattr_red_colorant},
{"green_colorant", (getter)cms_profile_getattr_green_colorant},
{"blue_colorant", (getter)cms_profile_getattr_blue_colorant},
{"red_primary", (getter)cms_profile_getattr_red_primary},
{"green_primary", (getter)cms_profile_getattr_green_primary},
{"blue_primary", (getter)cms_profile_getattr_blue_primary},
{"media_white_point_temperature",
(getter)cms_profile_getattr_media_white_point_temperature},
{"media_white_point", (getter)cms_profile_getattr_media_white_point},
{"media_black_point", (getter)cms_profile_getattr_media_black_point},
{"luminance", (getter)cms_profile_getattr_luminance},
{"chromatic_adaptation", (getter)cms_profile_getattr_chromatic_adaptation},
{"chromaticity", (getter)cms_profile_getattr_chromaticity},
{"colorant_table", (getter)cms_profile_getattr_colorant_table},
{"colorant_table_out", (getter)cms_profile_getattr_colorant_table_out},
{"intent_supported", (getter)cms_profile_getattr_is_intent_supported},
{"clut", (getter)cms_profile_getattr_is_clut},
{"icc_measurement_condition",
(getter)cms_profile_getattr_icc_measurement_condition},
{"icc_viewing_condition", (getter)cms_profile_getattr_icc_viewing_condition},

{NULL}};

static PyTypeObject CmsProfile_Type = {
PyVarObject_HEAD_INIT(NULL, 0) "PIL._imagingcms.CmsProfile", /*tp_name */
Expand Down

0 comments on commit a2d204a

Please sign in to comment.