mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Disallow BufferedImage of type TYPE_CUSTOM -- not decoding properly, and is kind of a weird case from ImageIO anyway
git-svn-id: https://zxing.googlecode.com/svn/trunk@241 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
f79bb97605
commit
bdcf60913b
Binary file not shown.
Before Width: | Height: | Size: 58 KiB |
|
@ -1,2 +0,0 @@
|
|||
ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP
|
||||
árvíztűrő tükörfúrógép
|
|
@ -45,6 +45,9 @@ public final class BufferedImageMonochromeBitmapSource implements MonochromeBitm
|
|||
private static final int LUMINANCE_BUCKETS = 1 << LUMINANCE_BITS;
|
||||
|
||||
public BufferedImageMonochromeBitmapSource(BufferedImage image) {
|
||||
if (image.getType() == BufferedImage.TYPE_CUSTOM) {
|
||||
throw new IllegalArgumentException("Can't handle BufferedImage of type TYPE_CUSTOM");
|
||||
}
|
||||
this.image = image;
|
||||
blackPoint = 0x7F;
|
||||
lastMethod = null;
|
||||
|
@ -125,9 +128,7 @@ public final class BufferedImageMonochromeBitmapSource implements MonochromeBitm
|
|||
}
|
||||
|
||||
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
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue