From: Matthieu Darbois Date: Mon, 22 Dec 2014 18:39:14 +0000 (+0000) Subject: [trunk] fixed colorspace mapping for raw grayscale images (fixes issue 456) X-Git-Tag: v2.1.1~22^2~150 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=6922124c4c29ce0f54323c50b17684eddf0e736c;p=openjpeg.git [trunk] fixed colorspace mapping for raw grayscale images (fixes issue 456) --- diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c index 7f4593b0..3de635be 100644 --- a/src/bin/jp2/convert.c +++ b/src/bin/jp2/convert.c @@ -2381,7 +2381,7 @@ static opj_image_t* rawtoimage_common(const char *filename, opj_cparameters_t *p numcomps = raw_cp->rawComp; /* FIXME ADE at this point, tcp_mct has not been properly set in calling function */ - if (numcomps == 0) { + if (numcomps == 1) { color_space = OPJ_CLRSPC_GRAY; } else if ((numcomps >= 3) && (parameters->tcp_mct == 0)) { color_space = OPJ_CLRSPC_SYCC;