src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java

Print this page

        

*** 382,392 **** super(message); } } public static LCMSImageLayout createImageLayout(Raster r) { LCMSImageLayout l = new LCMSImageLayout(); ! if (r instanceof ByteComponentRaster) { ByteComponentRaster br = (ByteComponentRaster)r; ComponentSampleModel csm = (ComponentSampleModel)r.getSampleModel(); l.pixelType = CHANNELS_SH(br.getNumBands()) | BYTES_SH(1); --- 382,393 ---- super(message); } } public static LCMSImageLayout createImageLayout(Raster r) { LCMSImageLayout l = new LCMSImageLayout(); ! if (r instanceof ByteComponentRaster && ! r.getSampleModel() instanceof ComponentSampleModel) { ByteComponentRaster br = (ByteComponentRaster)r; ComponentSampleModel csm = (ComponentSampleModel)r.getSampleModel(); l.pixelType = CHANNELS_SH(br.getNumBands()) | BYTES_SH(1);