throw new IllegalStateException("Rotate not supported");
}
- public boolean isRotatedSupported() {
+ public boolean isRotateSupported() {
return false;
}
* @return true iff rotation is supported
* @see #rotateCounterClockwise()
*/
- boolean isRotatedSupported();
+ boolean isRotateSupported();
}
try {
return doDecode(image, hints, tryHarder);
} catch (ReaderException re) {
- if (tryHarder && image.isRotatedSupported()) {
+ if (tryHarder && image.isRotateSupported()) {
MonochromeBitmapSource rotatedImage = image.rotateCounterClockwise();
return doDecode(rotatedImage, hints, tryHarder);
} else {
throw new IllegalStateException("Rotate not supported");
}
- public boolean isRotatedSupported() {
+ public boolean isRotateSupported() {
return false;
}
return new BufferedImageMonochromeBitmapSource(rotatedImage);
}
- public boolean isRotatedSupported() {
- return true;
+ public boolean isRotateSupported() {
+ return image.getType() != BufferedImage.TYPE_CUSTOM;
+ // Not sure what to make of the situation where a BufferedImage is parsed, but its format is not known
+ // In any event an AffineTransformOp on it will fail, so say it's not supported
}
/**