diff options
Diffstat (limited to 'converter/other/jpeg2000')
-rw-r--r-- | converter/other/jpeg2000/pamtojpeg2k.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/converter/other/jpeg2000/pamtojpeg2k.c b/converter/other/jpeg2000/pamtojpeg2k.c index 630f2310..1272a422 100644 --- a/converter/other/jpeg2000/pamtojpeg2k.c +++ b/converter/other/jpeg2000/pamtojpeg2k.c @@ -341,7 +341,7 @@ convertToJasperImage(struct pam * const inpamP, createJasperImage(inpamP, &jasperP); - if (strncmp(inpamP->tuple_type, "RGB", 3) == 0) { + if (strneq(inpamP->tuple_type, "RGB", 3)) { if (inpamP->depth < 3) pm_error("Input tuple type is RGB*, but depth is only %d. " "It should be at least 3.", inpamP->depth); @@ -355,8 +355,8 @@ convertToJasperImage(struct pam * const inpamP, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_RGB_B)); } } else { - if (strncmp(inpamP->tuple_type, "GRAYSCALE", 9) == 0 || - strncmp(inpamP->tuple_type, "BLACKANDWHITE", 13) == 0) { + if (strneq(inpamP->tuple_type, "GRAYSCALE", 9) || + strneq(inpamP->tuple_type, "BLACKANDWHITE", 13)) { jas_image_setclrspc(jasperP, JAS_CLRSPC_GENGRAY); jas_image_setcmpttype(jasperP, 0, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_GRAY_Y)); |