// first make sure we can get the unadjusted raster
final Raster raster = jpegReader.readRaster(0, param);
// and now use it with a YCCK converting color space.
PDFImage.this.colorSpace = new PDFColorSpace(new YCCKColorSpace(colorSpace.getColorSpace()));
// re-calculate the color model since the color space has changed
cm = PDFImage.this.createColorModel();
return new BufferedImage(
cm,
Raster.createWritableRaster(raster.getSampleModel(), raster.getDataBuffer(), null),