Commits

drolon  committed bc899ef

fixed loading of CMYK PSD when using PSD_CMYK load flag

  • Participants
  • Parent commits 10deede

Comments (0)

Files changed (1)

File Source/FreeImage/PSDParser.cpp

 		}
 
 		// set ICC profile
-		if(NULL != _iccProfile._ProfileData) {
-			FreeImage_CreateICCProfile(Bitmap, _iccProfile._ProfileData, _iccProfile._ProfileSize);
-			if ((flags & PSD_CMYK) == PSD_CMYK) {
+		FreeImage_CreateICCProfile(Bitmap, _iccProfile._ProfileData, _iccProfile._ProfileSize);
+		if ((flags & PSD_CMYK) == PSD_CMYK) {
+			short mode = _headerInfo._ColourMode;
+			if((mode == PSDP_CMYK) || (mode == PSDP_MULTICHANNEL)) {
 				FreeImage_GetICCProfile(Bitmap)->flags |= FIICC_COLOR_IS_CMYK;
 			}
 		}