X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=zxingorg%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fweb%2FDecodeServlet.java;h=4ed5f5a393fbffd916949aa1208f8eb04b796ca8;hp=7803a407fdb252810555279ad1932dcfaeb063fb;hb=608fe313d82bb79f0f5a96856697bdfb4a6305d3;hpb=db2d9dfbc5ca85836237e287cd8da84da2fb0ff4 diff --git a/zxingorg/src/com/google/zxing/web/DecodeServlet.java b/zxingorg/src/com/google/zxing/web/DecodeServlet.java index 7803a407..4ed5f5a3 100644 --- a/zxingorg/src/com/google/zxing/web/DecodeServlet.java +++ b/zxingorg/src/com/google/zxing/web/DecodeServlet.java @@ -27,7 +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; import org.apache.commons.fileupload.FileUploadException; @@ -78,7 +78,7 @@ import javax.servlet.http.HttpServletResponse; /** * {@link HttpServlet} which decodes images containing barcodes. Given a URL, it will * retrieve the image and decode it. It can also process image files uploaded via POST. - * + * * @author Sean Owen */ public final class DecodeServlet extends HttpServlet { @@ -102,7 +102,7 @@ public final class DecodeServlet extends HttpServlet { possibleFormats.add(BarcodeFormat.ITF); possibleFormats.add(BarcodeFormat.QR_CODE); possibleFormats.add(BarcodeFormat.DATAMATRIX); - possibleFormats.add(BarcodeFormat.PDF417); + possibleFormats.add(BarcodeFormat.PDF417); HINTS.put(DecodeHintType.POSSIBLE_FORMATS, possibleFormats); } @@ -249,7 +249,7 @@ public final class DecodeServlet extends HttpServlet { Result result; try { LuminanceSource source = new BufferedImageLuminanceSource(image); - BinaryBitmap bitmap = new BinaryBitmap(new GlobalHistogramBinarizer(source)); + BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); result = reader.decode(bitmap, HINTS); } catch (ReaderException re) { log.info("DECODE FAILED: " + re.toString());