// In case we are asked to use certain tile dimensions we tile
// also at this stage in case the read type is Direct since
// buffered images comes up untiled and this can affect the
// performances of the subsequent affine operation.
//
final Hints localHints = new Hints(hints);
if (hints != null && !hints.containsKey(JAI.KEY_BORDER_EXTENDER)) {
final Object extender = hints.get(JAI.KEY_BORDER_EXTENDER);
if (!(extender != null && extender instanceof BorderExtender)) {
localHints.add(ImageUtilities.EXTEND_BORDER_BY_COPYING);
}
}
ImageWorker iw = new ImageWorker(image);
iw.setRenderingHints(localHints);