ImageTypeSpecifier imageType = param.getDestinationType();
if (imageType != null) {
SampleModel sm = imageType.getSampleModel();
width = sm.getWidth();
height = sm.getHeight();
return imageType.createBufferedImage(width, height);
}
throw new IllegalArgumentException(UNKNOWN_IMAGE_TYPE);
}
private WritableRaster getDestinationRaster(ImageReadParam param) {