diff --git a/zxingorg/build.xml b/zxingorg/build.xml
index 2303bcf2c..0c59a7e6c 100644
--- a/zxingorg/build.xml
+++ b/zxingorg/build.xml
@@ -84,6 +84,7 @@
+
diff --git a/zxingorg/src/com/google/zxing/web/DecodeServlet.java b/zxingorg/src/com/google/zxing/web/DecodeServlet.java
index 2f5e198f0..ea213d3fa 100644
--- a/zxingorg/src/com/google/zxing/web/DecodeServlet.java
+++ b/zxingorg/src/com/google/zxing/web/DecodeServlet.java
@@ -63,6 +63,7 @@ import java.net.SocketException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.UnknownHostException;
+import java.util.Collection;
import java.util.Hashtable;
import java.util.List;
import java.util.Vector;
@@ -93,7 +94,7 @@ public final class DecodeServlet extends HttpServlet {
static {
HINTS = new Hashtable(5);
HINTS.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);
- Vector possibleFormats = new Vector();
+ Collection possibleFormats = new Vector();
possibleFormats.add(BarcodeFormat.UPC_A);
possibleFormats.add(BarcodeFormat.UPC_E);
possibleFormats.add(BarcodeFormat.EAN_8);
@@ -253,9 +254,16 @@ public final class DecodeServlet extends HttpServlet {
BinaryBitmap bitmap = new BinaryBitmap(new GlobalHistogramBinarizer(source));
result = reader.decode(bitmap, HINTS);
} catch (ReaderException re) {
- log.info("DECODE FAILED: " + re.toString());
- response.sendRedirect("notfound.jspx");
- return;
+ try {
+ // Try again with other binarizer
+ LuminanceSource source = new BufferedImageLuminanceSource(image);
+ BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
+ result = reader.decode(bitmap, HINTS);
+ } catch (ReaderException re2) {
+ log.info("DECODE FAILED: " + re.toString());
+ response.sendRedirect("notfound.jspx");
+ return;
+ }
}
if (request.getParameter("full") == null) {
diff --git a/zxingorg/web/WEB-INF/lib/commons-codec-1.3.jar b/zxingorg/web/WEB-INF/lib/commons-codec-1.3.jar
deleted file mode 100644
index 957b6752a..000000000
Binary files a/zxingorg/web/WEB-INF/lib/commons-codec-1.3.jar and /dev/null differ
diff --git a/zxingorg/web/WEB-INF/lib/commons-codec-1.4.jar b/zxingorg/web/WEB-INF/lib/commons-codec-1.4.jar
new file mode 100644
index 000000000..458d432da
Binary files /dev/null and b/zxingorg/web/WEB-INF/lib/commons-codec-1.4.jar differ
diff --git a/zxingorg/web/WEB-INF/lib/httpclient-4.0.1.jar b/zxingorg/web/WEB-INF/lib/httpclient-4.0.1.jar
new file mode 100644
index 000000000..e9c961f1b
Binary files /dev/null and b/zxingorg/web/WEB-INF/lib/httpclient-4.0.1.jar differ
diff --git a/zxingorg/web/WEB-INF/lib/httpclient-4.0.jar b/zxingorg/web/WEB-INF/lib/httpclient-4.0.jar
deleted file mode 100644
index a2fe7c1ab..000000000
Binary files a/zxingorg/web/WEB-INF/lib/httpclient-4.0.jar and /dev/null differ
diff --git a/zxingorg/web/WEB-INF/lib/httpmime-4.0.1.jar b/zxingorg/web/WEB-INF/lib/httpmime-4.0.1.jar
new file mode 100644
index 000000000..c27df785b
Binary files /dev/null and b/zxingorg/web/WEB-INF/lib/httpmime-4.0.1.jar differ
diff --git a/zxingorg/web/WEB-INF/lib/httpmime-4.0.jar b/zxingorg/web/WEB-INF/lib/httpmime-4.0.jar
deleted file mode 100644
index 1658161ce..000000000
Binary files a/zxingorg/web/WEB-INF/lib/httpmime-4.0.jar and /dev/null differ
diff --git a/zxingorg/web/badimage.jspx b/zxingorg/web/badimage.jspx
index 825658690..7743222f9 100644
--- a/zxingorg/web/badimage.jspx
+++ b/zxingorg/web/badimage.jspx
@@ -22,9 +22,10 @@
Bad Image
+
- Bad Image
+
The image you uploaded could not be decoded, or was too large. Go "Back" in your browser and try another
image.
diff --git a/zxingorg/web/badurl.jspx b/zxingorg/web/badurl.jspx
index d28e1d468..a73244e68 100644
--- a/zxingorg/web/badurl.jspx
+++ b/zxingorg/web/badurl.jspx
@@ -22,9 +22,10 @@
Bad URL
+
- Bad URL
+
You didn't specify a URL, or the URL was not valid, or did not return an image. Go "Back" in your browser and
try again.
diff --git a/zxingorg/web/decode.jspx b/zxingorg/web/decode.jspx
index f3d08b693..8a51b9ba2 100644
--- a/zxingorg/web/decode.jspx
+++ b/zxingorg/web/decode.jspx
@@ -22,9 +22,10 @@
ZXing Decoder Online
+
- ZXing Decoder Online
+
This is a simple page that will let you decode a 1D or 2D barcode found
in an image online. Enter a URL below.
@@ -45,7 +46,7 @@
project page
for details.
- Copyright 2008 and onwards ZXing authors
+
diff --git a/zxingorg/web/decoderesult.jspx b/zxingorg/web/decoderesult.jspx
index 265caad38..40a0c482e 100644
--- a/zxingorg/web/decoderesult.jspx
+++ b/zxingorg/web/decoderesult.jspx
@@ -24,12 +24,13 @@
Decode Succeeded
+
- Decode Succeeded
+
Raw text
@@ -52,7 +53,7 @@
request.getAttribute("displayResult")
- Copyright 2008 and onwards ZXing authors
+
diff --git a/zxingorg/web/index.jspx b/zxingorg/web/index.jspx
index 6c928ec9a..809d68121 100644
--- a/zxingorg/web/index.jspx
+++ b/zxingorg/web/index.jspx
@@ -26,14 +26,14 @@
Download ZXing Reader
- Download the ZXing Barcode Reader for J2ME.
+ Download the Android client.
+
+
+ Download the Barcode Reader for J2ME.
(Download the alternate "basic" version for J2ME.)
-
-
- Download the Android client.
-
+
Copyright 2008 and onwards ZXing authors
diff --git a/zxingorg/web/notfound.jspx b/zxingorg/web/notfound.jspx
index c5cb2dd04..039391bc6 100644
--- a/zxingorg/web/notfound.jspx
+++ b/zxingorg/web/notfound.jspx
@@ -22,9 +22,10 @@
No Barcode Found
+
- No Barcode Found
+
No barcode was found in this image. Either it did not contain a barcode, or did not contain one in a
supported format, or the software was simply unable to find it. Go "Back" in your browser and try another image.
diff --git a/zxingorg/web/style.css b/zxingorg/web/style.css
new file mode 100644
index 000000000..bdfde3c98
--- /dev/null
+++ b/zxingorg/web/style.css
@@ -0,0 +1,7 @@
+body{background-color:#e9eef3;font-family:Arial,sans-serif;font-size:12px}
+td{font-size:14px}
+#header{background-color:#dde3e9;border-bottom:1px solid #f2f7fc}
+#header h1{font-size:15px;font-weight:bold;padding:12px;border-bottom:1px solid #c8d0d9}
+#header span{font-weight:normal;color:#5e6b75}
+#footer{width:100%;text-align:center;padding-top:12px}
+#footer a{text-decoration:none;color:#5e6b75}