diff --git a/coders/dpx.c b/coders/dpx.c
index 0738159..8190e04 100644
--- a/coders/dpx.c
+++ b/coders/dpx.c
@@ -598,6 +598,7 @@
/*
Read DPX file header.
*/
+ SetImageColorspace(image,RGBColorspace,exception);
offset=0;
count=ReadBlob(image,4,(unsigned char *) magick);
offset+=count;
@@ -1046,21 +1047,21 @@
case CbYACrYA4224ComponentType:
case CbYCr444ComponentType:
{
- image->colorspace=Rec709YCbCrColorspace;
+ SetImageColorspace(image,Rec709YCbCrColorspace,exception);
break;
}
case LumaComponentType:
{
- image->colorspace=sRGBColorspace;
+ SetImageColorspace(image,sRGBColorspace,exception);
break;
}
default:
{
- image->colorspace=sRGBColorspace;
+ SetImageColorspace(image,sRGBColorspace,exception);
if (dpx.image.image_element[0].transfer == LogarithmicColorimetric)
- image->colorspace=LogColorspace;
+ SetImageColorspace(image,LogColorspace,exception);
if (dpx.image.image_element[0].transfer == PrintingDensityColorimetric)
- image->colorspace=LogColorspace;
+ SetImageColorspace(image,LogColorspace,exception);
break;
}
}