@Override protected PlanarImage execute (final ChangeFormatOp operation, final EditableImage image, PlanarImage planarImage) { final ParameterBlock pb = new ParameterBlock(); pb.addSource(planarImage); pb.add(operation.getType().value()); RenderingHints hints = null; final EditableImage.DataType dataType = operation.getType(); if (dataType == EditableImage.DataType.SHORT) { final ImageLayout imageLayout = new ImageLayout(); imageLayout.setColorModel(planarImage.getColorModel()); hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, imageLayout); log.info(">>>> using hints: {}", hints); } planarImage = JAI.create("format", pb, hints); JAIUtils.logImage(log, ">>>> ChangeFormatJAIOp returning {}", planarImage); return planarImage; } }