Output image color space set when decoding a JP2 file
This commit is contained in:
parent
92398409a5
commit
c924975434
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
June 21, 2007
|
||||||
|
* [FOD] Output image color space set when decoding a JP2 file in jp2.c
|
||||||
|
|
||||||
June 18, 2007
|
June 18, 2007
|
||||||
* [GB] Reload image doesn't crash in OPJViewer; more settings saved to registry
|
* [GB] Reload image doesn't crash in OPJViewer; more settings saved to registry
|
||||||
|
|
||||||
|
|
|
@ -563,6 +563,16 @@ opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio) {
|
||||||
opj_event_msg(cinfo, EVT_ERROR, "Failed to decode J2K image\n");
|
opj_event_msg(cinfo, EVT_ERROR, "Failed to decode J2K image\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set Image Color Space */
|
||||||
|
if (jp2->enumcs == 16)
|
||||||
|
image->color_space = CLRSPC_SRGB;
|
||||||
|
else if (jp2->enumcs == 17)
|
||||||
|
image->color_space = CLRSPC_GRAY;
|
||||||
|
else if (jp2->enumcs == 18)
|
||||||
|
image->color_space = CLRSPC_SYCC;
|
||||||
|
else
|
||||||
|
image->color_space = CLRSPC_UNKNOWN;
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue