Commit dfdc1874 authored by pdknsk's avatar pdknsk Committed by Felix Riemann
Browse files

Assume sRGB when image doesn't have an ICC profile attached

This seems to be no problem with other image viewers and
is apparently also recommended by W3C.
parent 1b0fb6b3
......@@ -693,7 +693,14 @@ eog_image_apply_display_profile (EogImage *img, cmsHPROFILE screen)
priv = img->priv;
if (screen == NULL || priv->profile == NULL) return;
if (screen == NULL) return;
if (priv->profile == NULL) {
/* Assume sRGB color space for images without ICC profile */
eog_debug_message (DEBUG_LCMS, "Image has no ICC profile. "
"Assuming sRGB.");
priv->profile = cmsCreate_sRGBProfile ();
/* TODO: support other colorspaces than RGB */
if (cmsGetColorSpace (priv->profile) != cmsSigRgbData ||
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment