![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for imageio_profile.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| dt_colorspaces_color_profile_type_t dt_colorspaces_cicp_to_type | ( | const dt_colorspaces_cicp_t * | cicp, |
| const char * | filename | ||
| ) |
try to infer profile type from CICP
Definition at line 588 of file imageio_profile.c.
References DT_CICP_COLOR_PRIMARIES_P3, DT_CICP_COLOR_PRIMARIES_REC2020, DT_CICP_COLOR_PRIMARIES_REC709, DT_CICP_COLOR_PRIMARIES_UNSPECIFIED, DT_CICP_COLOR_PRIMARIES_XYZ, DT_CICP_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL, DT_CICP_MATRIX_COEFFICIENTS_IDENTITY, DT_CICP_MATRIX_COEFFICIENTS_REC2020_NCL, DT_CICP_MATRIX_COEFFICIENTS_REC601, DT_CICP_MATRIX_COEFFICIENTS_REC709, DT_CICP_MATRIX_COEFFICIENTS_SYCC, DT_CICP_MATRIX_COEFFICIENTS_UNSPECIFIED, DT_CICP_TRANSFER_CHARACTERISTICS_HLG, DT_CICP_TRANSFER_CHARACTERISTICS_LINEAR, DT_CICP_TRANSFER_CHARACTERISTICS_PQ, DT_CICP_TRANSFER_CHARACTERISTICS_REC2020_10B, DT_CICP_TRANSFER_CHARACTERISTICS_REC2020_12B, DT_CICP_TRANSFER_CHARACTERISTICS_REC601, DT_CICP_TRANSFER_CHARACTERISTICS_REC709, DT_CICP_TRANSFER_CHARACTERISTICS_SRGB, DT_CICP_TRANSFER_CHARACTERISTICS_UNSPECIFIED, DT_COLORSPACE_DISPLAY_P3, DT_COLORSPACE_HLG_P3, DT_COLORSPACE_HLG_REC2020, DT_COLORSPACE_LIN_REC2020, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_NONE, DT_COLORSPACE_PQ_P3, DT_COLORSPACE_PQ_REC2020, DT_COLORSPACE_REC709, DT_COLORSPACE_SRGB, DT_COLORSPACE_XYZ, DT_DEBUG_IMAGEIO, dt_print(), dt_colorspaces_color_profile_t::filename, IS_NULL_PTR, and L.
Referenced by dt_image_find_best_color_profile().
| const cmsHPROFILE dt_colorspaces_get_embedded_profile | ( | const int32_t | imgid, |
| dt_colorspaces_color_profile_type_t * | type, | ||
| gboolean * | new_profile | ||
| ) |
return the embedded profile of a particular image
Definition at line 411 of file imageio_profile.c.
References dt_image_find_best_color_profile(), L, and type.
Referenced by _build_embedded_profile(), and dt_image_get_embedded_output_profile().
| dt_colorspaces_color_profile_type_t dt_colorspaces_get_input_profile_from_image | ( | int32_t | imgid, |
| dt_colorspaces_color_profile_type_t | requested, | ||
| cmsHPROFILE * | output, | ||
| gboolean * | new_profile | ||
| ) |
Resolve an embedded/matrix input profile for a given image, honoring the requested type when possible. For non-RAW images, falls back to dt_image_find_best_color_profile() to avoid invalid matrix usage.
| imgid | ID of the picture |
| requested | Requested embedded/matrix profile type |
| output | If not NULL, writes the generated color profile into this pointer. |
| new_profile | Will be set to true if a new profile was generated (aka embedded profile) and will need to be freed. |
Definition at line 308 of file imageio_profile.c.
References dt_image_t::adobe_XYZ_to_CAM, dt_image_t::d65_color_matrix, DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_NONE, DT_COLORSPACE_STANDARD_MATRIX, dt_colorspaces_cleanup_profile(), dt_colorspaces_create_xyzimatrix_profile(), dt_colorspaces_get_rgb_profile_from_mem(), dt_image_cache_get(), dt_image_cache_read_release(), dt_image_find_best_color_profile(), dt_image_is_matrix_correction_supported(), FALSE, IS_NULL_PTR, L, dt_image_t::profile, dt_image_t::profile_size, TRUE, and type.
Referenced by dt_image_get_input_profile().
| const dt_colorspaces_color_profile_t * dt_colorspaces_get_output_profile | ( | const int32_t | imgid, |
| dt_colorspaces_color_profile_type_t * | over_type, | ||
| const char * | over_filename | ||
| ) |
return the output profile as set in colorout, taking export override into account if passed in.
Definition at line 555 of file imageio_profile.c.
References _build_embedded_profile(), DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_NONE, DT_COLORSPACE_SRGB, DT_COLORSPACE_STANDARD_MATRIX, dt_colorspaces_get_profile(), DT_PROFILE_ROLE_MONITOR, DT_PROFILE_ROLE_OUTPUT, IS_NULL_PTR, L, and p.
Referenced by _export_image(), dt_imageio_export_with_flags(), dt_imageio_jpeg_write_with_icc_profile(), write_image(), write_image(), write_image(), write_image(), write_image(), write_image(), and write_image().
| G_BEGIN_DECLS dt_colorspaces_color_profile_type_t dt_image_find_best_color_profile | ( | int32_t | imgid, |
| cmsHPROFILE * | output, | ||
| gboolean * | new_profile | ||
| ) |
Best effort to find a suitable (input) color profile for a given image, using embedded ICC or EXIF whenever possible. This will also init the profile in the image cache.
| imgid | ID of the picture |
| output | If not NULL, writes the generated color profile into this pointer. |
| new_profile | Will be set to true if a new profile was generated (aka embedded profile) and will need to be freed. If false and output profile is returned, the profile returned already exists on the public list of profiles and should not be freed. |
Definition at line 87 of file imageio_profile.c.
References dt_image_t::adobe_XYZ_to_CAM, dt_image_t::colorspace, dt_image_t::d65_color_matrix, DT_COLORSPACE_ADOBERGB, DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_LIN_REC2020, DT_COLORSPACE_LIN_REC709, DT_COLORSPACE_NONE, DT_COLORSPACE_SRGB, DT_COLORSPACE_STANDARD_MATRIX, dt_colorspaces_cicp_to_type(), dt_colorspaces_cleanup_profile(), dt_colorspaces_create_xyzimatrix_profile(), dt_colorspaces_get_profile(), dt_colorspaces_get_rgb_profile_from_mem(), DT_DEBUG_COLORPROFILE, dt_free, DT_IMAGE_4BAYER, dt_image_cache_get(), DT_IMAGE_CACHE_RELAXED, dt_image_cache_write_release(), DT_IMAGE_COLORSPACE_ADOBE_RGB, DT_IMAGE_COLORSPACE_SRGB, dt_image_full_path(), dt_image_is_matrix_correction_supported(), dt_image_is_monochrome(), dt_imageio_avif_read_profile(), dt_imageio_heif_read_profile(), dt_imageio_j2k_read_profile(), dt_imageio_jpeg_read_header(), dt_imageio_jpeg_read_profile(), dt_imageio_png_read_profile(), dt_imageio_tiff_read_profile(), dt_print(), DT_PROFILE_ROLE_INPUT, FALSE, dt_image_t::flags, IS_NULL_PTR, L, PATH_MAX, dt_colorspaces_color_profile_t::profile, dt_image_t::profile, dt_image_t::profile_size, and TRUE.
Referenced by dt_colorspaces_get_embedded_profile(), dt_colorspaces_get_input_profile_from_image(), and reload_defaults().
| struct dt_colorspaces_color_profile_t * dt_image_get_embedded_output_profile | ( | const int32_t | imgid, |
| dt_colorspaces_color_profile_type_t * | type | ||
| ) |
Resolve the ICC profile embedded in an image's own file, into an opaque container.
The export counterpart of dt_image_get_input_profile(): when an export names no output profile, the image's embedded one is used. Same ownership contract – the container knows whether it created the handle, so the caller does not.
| imgid | image whose embedded profile is wanted. |
| type | receives the profile type resolved. Must not be NULL. |
dt_colorspaces_free_image_profile(), or NULL when the image has no usable embedded profile. Definition at line 540 of file imageio_profile.c.
References container(), dt_colorspaces_cleanup_profile(), dt_colorspaces_get_embedded_profile(), dt_colorspaces_new_image_profile(), FALSE, IS_NULL_PTR, L, dt_colorspaces_color_profile_t::profile, and type.
Referenced by commit_params().
| struct dt_colorspaces_color_profile_t * dt_image_get_input_profile | ( | const int32_t | imgid, |
| const dt_colorspaces_color_profile_type_t | requested, | ||
| const char * | camera_makermodel, | ||
| dt_colorspaces_color_profile_type_t * | resolved | ||
| ) |
Resolve an image's own input profile into an opaque container, whatever kind it is.
The six image-derived profile types (DT_COLORSPACE_EMBEDDED_ICC through DT_COLORSPACE_ALTERNATE_MATRIX) are the ones that are NOT in the application profile list and cannot be resolved by identity, because their matrices come from this one image's camera data. Three of them are built from the camera model, three from the file's own contents, and iop/colorin.c used to open-code the cascade between them – holding a raw cmsHPROFILE and a separate "did I create this one" flag it had to get right on every early return.
This resolves all six and hands back a container that carries the ownership answer with it, so a caller never decides whether to close a handle. Pass it straight to dt_colorspaces_prepare_conversion() as an endpoint's resolved field.
| imgid | image whose profile is wanted. |
| requested | one of the six image-derived types. Any other type returns NULL, since those are resolvable by identity and belong to the profile list. |
| camera_makermodel | the image's camera_makermodel, needed by the three built-from-the-camera types. May be NULL, which makes those three fail over to the embedded-ICC branch exactly as a missing matrix does. |
| resolved | if not NULL, receives the type actually resolved, which may differ from requested when a fallback fired (a camera with no matrix in the table, an image with no embedded ICC). Set to DT_COLORSPACE_NONE when NULL is returned. |
dt_colorspaces_free_image_profile(), or NULL when nothing could be resolved. The caller owns it and must outlive anything derived from it. Definition at line 482 of file imageio_profile.c.
References container(), DT_COLORSPACE_ALTERNATE_MATRIX, DT_COLORSPACE_EMBEDDED_ICC, DT_COLORSPACE_EMBEDDED_MATRIX, DT_COLORSPACE_ENHANCED_MATRIX, DT_COLORSPACE_NONE, DT_COLORSPACE_STANDARD_MATRIX, DT_COLORSPACE_VENDOR_MATRIX, dt_colorspaces_cleanup_profile(), dt_colorspaces_create_alternate_profile(), dt_colorspaces_create_darktable_profile(), dt_colorspaces_create_vendor_profile(), dt_colorspaces_get_input_profile_from_image(), dt_colorspaces_new_image_profile(), FALSE, IS_NULL_PTR, L, dt_colorspaces_color_profile_t::profile, TRUE, and type.
Referenced by commit_params().