src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java
Print this page
*** 159,175 ****
LCMS.colorConvert(this, in, out);
}
public void colorConvert(BufferedImage src, BufferedImage dst) {
! if (LCMSImageLayout.isSupported(src) &&
! LCMSImageLayout.isSupported(dst))
! {
! doTransform(new LCMSImageLayout(src), new LCMSImageLayout(dst));
return;
}
! LCMSImageLayout srcIL, dstIL;
Raster srcRas = src.getRaster();
WritableRaster dstRas = dst.getRaster();
ColorModel srcCM = src.getColorModel();
ColorModel dstCM = dst.getColorModel();
int w = src.getWidth();
--- 159,180 ----
LCMS.colorConvert(this, in, out);
}
public void colorConvert(BufferedImage src, BufferedImage dst) {
! LCMSImageLayout srcIL, dstIL;
!
! dstIL = LCMSImageLayout.createImageLayout(dst);
!
! if (dstIL != null) {
! srcIL = LCMSImageLayout.createImageLayout(src);
! if (srcIL != null) {
! doTransform(srcIL, dstIL);
return;
}
! }
!
Raster srcRas = src.getRaster();
WritableRaster dstRas = dst.getRaster();
ColorModel srcCM = src.getColorModel();
ColorModel dstCM = dst.getColorModel();
int w = src.getWidth();
*** 437,446 ****
--- 442,459 ----
}
public void colorConvert(Raster src, WritableRaster dst) {
LCMSImageLayout srcIL, dstIL;
+ dstIL = LCMSImageLayout.createImageLayout(dst);
+ if (dstIL != null) {
+ srcIL = LCMSImageLayout.createImageLayout(src);
+ if (srcIL != null) {
+ doTransform(srcIL, dstIL);
+ return;
+ }
+ }
// Can't pass src and dst directly to CMM, so process per scanline
SampleModel srcSM = src.getSampleModel();
SampleModel dstSM = dst.getSampleModel();
int srcTransferType = src.getTransferType();
int dstTransferType = dst.getTransferType();