[trunk] fixed colorspace mapping for raw grayscale images (fixes issue 456)
authorMatthieu Darbois <mayeut@users.noreply.github.com>
Mon, 22 Dec 2014 18:39:14 +0000 (18:39 +0000)
committerMatthieu Darbois <mayeut@users.noreply.github.com>
Mon, 22 Dec 2014 18:39:14 +0000 (18:39 +0000)
src/bin/jp2/convert.c

index 7f4593b0f14b0bf279c3ce5161c56bee8bd82099..3de635be69d9452089a099d575c70b067cdc3de7 100644 (file)
@@ -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;