diff --git a/android/src/com/google/zxing/client/android/YUVMonochromeBitmapSource.java b/android/src/com/google/zxing/client/android/YUVMonochromeBitmapSource.java index 3df185547..90dc085dc 100755 --- a/android/src/com/google/zxing/client/android/YUVMonochromeBitmapSource.java +++ b/android/src/com/google/zxing/client/android/YUVMonochromeBitmapSource.java @@ -118,7 +118,7 @@ final class YUVMonochromeBitmapSource implements MonochromeBitmapSource { throw new IllegalStateException("Rotate not supported"); } - public boolean isRotatedSupported() { + public boolean isRotateSupported() { return false; } diff --git a/core/src/com/google/zxing/MonochromeBitmapSource.java b/core/src/com/google/zxing/MonochromeBitmapSource.java index 799a6e16b..f921ebb06 100644 --- a/core/src/com/google/zxing/MonochromeBitmapSource.java +++ b/core/src/com/google/zxing/MonochromeBitmapSource.java @@ -93,6 +93,6 @@ public interface MonochromeBitmapSource { * @return true iff rotation is supported * @see #rotateCounterClockwise() */ - boolean isRotatedSupported(); + boolean isRotateSupported(); } diff --git a/core/src/com/google/zxing/oned/AbstractOneDReader.java b/core/src/com/google/zxing/oned/AbstractOneDReader.java index a543f3180..a754db2c0 100644 --- a/core/src/com/google/zxing/oned/AbstractOneDReader.java +++ b/core/src/com/google/zxing/oned/AbstractOneDReader.java @@ -43,7 +43,7 @@ public abstract class AbstractOneDReader implements OneDReader { 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 { diff --git a/javame/src/com/google/zxing/client/j2me/LCDUIImageMonochromeBitmapSource.java b/javame/src/com/google/zxing/client/j2me/LCDUIImageMonochromeBitmapSource.java index 3f1e37418..fbbf0da66 100644 --- a/javame/src/com/google/zxing/client/j2me/LCDUIImageMonochromeBitmapSource.java +++ b/javame/src/com/google/zxing/client/j2me/LCDUIImageMonochromeBitmapSource.java @@ -112,7 +112,7 @@ public final class LCDUIImageMonochromeBitmapSource implements MonochromeBitmapS throw new IllegalStateException("Rotate not supported"); } - public boolean isRotatedSupported() { + public boolean isRotateSupported() { return false; } diff --git a/javase/src/com/google/zxing/client/j2se/BufferedImageMonochromeBitmapSource.java b/javase/src/com/google/zxing/client/j2se/BufferedImageMonochromeBitmapSource.java index 92174bb7e..86f17fde6 100644 --- a/javase/src/com/google/zxing/client/j2se/BufferedImageMonochromeBitmapSource.java +++ b/javase/src/com/google/zxing/client/j2se/BufferedImageMonochromeBitmapSource.java @@ -124,8 +124,10 @@ public final class BufferedImageMonochromeBitmapSource implements MonochromeBitm 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 } /**