for (int i = 0; i < imgWrapper.getNumOfImages(); i++) {
PlanarImage img = imgWrapper.getAsPlanarImage(i);
Node imgMetadata = imgWrapper.getMetadata(i);
if (img.getColorModel() instanceof IndexColorModel) {
throw new SimpleImageException(
"Unsupported scale image with IndexColorModel, please convert to RGB color model first");
}
// No more need, index color model will triger throws exception first
// NodeUtils.removeChild(imgMetadata, "LocalColorTable");
Node imgDescNode = NodeUtils.getChild(imgMetadata, "ImageDescriptor");