mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Issue 312, use old global binarizer for uploaded images
git-svn-id: https://zxing.googlecode.com/svn/trunk@1176 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
c7ab6ce807
commit
6b4a10a302
|
@ -27,6 +27,7 @@ import com.google.zxing.Result;
|
|||
import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
|
||||
import com.google.zxing.client.result.ParsedResult;
|
||||
import com.google.zxing.client.result.ResultParser;
|
||||
import com.google.zxing.common.GlobalHistogramBinarizer;
|
||||
import com.google.zxing.common.HybridBinarizer;
|
||||
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
|
@ -249,7 +250,7 @@ public final class DecodeServlet extends HttpServlet {
|
|||
Result result;
|
||||
try {
|
||||
LuminanceSource source = new BufferedImageLuminanceSource(image);
|
||||
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
|
||||
BinaryBitmap bitmap = new BinaryBitmap(new GlobalHistogramBinarizer(source));
|
||||
result = reader.decode(bitmap, HINTS);
|
||||
} catch (ReaderException re) {
|
||||
log.info("DECODE FAILED: " + re.toString());
|
||||
|
|
Loading…
Reference in a new issue