< prev index next >

src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java

Print this page

        

*** 872,888 **** hasAlpha = true; } return chroma; } ! boolean idsAreJFIF = true; ! for (int i = 0; i < sof.componentSpecs.length; i++) { ! int id = sof.componentSpecs[i].componentId; ! if ((id < 1) || (id >= sof.componentSpecs.length)) { ! idsAreJFIF = false; ! } } if (idsAreJFIF) { csType.setAttribute("name", "YCbCr"); if (numChannels == 4) { --- 872,888 ---- hasAlpha = true; } return chroma; } ! boolean idsAreJFIF = false; ! int cid0 = sof.componentSpecs[0].componentId; ! int cid1 = sof.componentSpecs[1].componentId; ! int cid2 = sof.componentSpecs[2].componentId; ! if ((cid0 == 1) && (cid1 == 2) && (cid2 == 3)) { ! idsAreJFIF = true; } if (idsAreJFIF) { csType.setAttribute("name", "YCbCr"); if (numChannels == 4) {
< prev index next >