1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.6.0_13) on Fri Jun 26 13:12:28 EDT 2009 -->
10 <META NAME="date" CONTENT="2009-06-26">
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
14 <SCRIPT type="text/javascript">
15 function windowTitle()
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="MultiFormatReader";
27 <BODY BGCOLOR="white" onload="windowTitle();">
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <A NAME="navbar_top"><!-- --></A>
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37 <A NAME="navbar_top_firstrow"><!-- --></A>
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39 <TR ALIGN="center" VALIGN="top">
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
50 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing"><B>PREV CLASS</B></A>
58 <A HREF="../../../com/google/zxing/MultiFormatWriter.html" title="class in com.google.zxing"><B>NEXT CLASS</B></A></FONT></TD>
59 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60 <A HREF="../../../index.html?com/google/zxing/MultiFormatReader.html" target="_top"><B>FRAMES</B></A>
61 <A HREF="MultiFormatReader.html" target="_top"><B>NO FRAMES</B></A>
62 <SCRIPT type="text/javascript">
65 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
70 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
77 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
79 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
83 <A NAME="skip-navbar_top"></A>
84 <!-- ========= END OF TOP NAVBAR ========= -->
87 <!-- ======== START OF CLASS DATA ======== -->
90 com.google.zxing</FONT>
92 Class MultiFormatReader</H2>
95 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.google.zxing.MultiFormatReader</B>
98 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../com/google/zxing/Reader.html" title="interface in com.google.zxing">Reader</A></DD>
102 <DT><PRE>public final class <B>MultiFormatReader</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../com/google/zxing/Reader.html" title="interface in com.google.zxing">Reader</A></DL>
106 MultiFormatReader is a convenience class and the main entry point into the library for most uses.
107 By default it attempts to decode all barcode formats that the library supports. Optionally, you
108 can provide a hints object to request different behavior, for example only decoding QR codes.
113 <DT><B>Author:</B></DT>
114 <DD>Sean Owen, dswitkin@google.com (Daniel Switkin)</DD>
120 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
122 <A NAME="constructor_summary"><!-- --></A>
123 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
124 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
125 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
126 <B>Constructor Summary</B></FONT></TH>
128 <TR BGCOLOR="white" CLASS="TableRowColor">
129 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#MultiFormatReader()">MultiFormatReader</A></B>()</CODE>
132 </TD>
136 <!-- ========== METHOD SUMMARY =========== -->
138 <A NAME="method_summary"><!-- --></A>
139 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142 <B>Method Summary</B></FONT></TH>
144 <TR BGCOLOR="white" CLASS="TableRowColor">
145 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146 <CODE> <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A></CODE></FONT></TD>
147 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#decode(com.google.zxing.MonochromeBitmapSource)">decode</A></B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A> image)</CODE>
150 This version of decode honors the intent of Reader.decode(MonochromeBitmapSource) in that it
151 passes null as a hint to the decoders.</TD>
153 <TR BGCOLOR="white" CLASS="TableRowColor">
154 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155 <CODE> <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A></CODE></FONT></TD>
156 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#decode(com.google.zxing.MonochromeBitmapSource, java.util.Hashtable)">decode</A></B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A> image,
157 java.util.Hashtable hints)</CODE>
160 Decode an image using the hints provided.</TD>
162 <TR BGCOLOR="white" CLASS="TableRowColor">
163 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
164 <CODE> <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A></CODE></FONT></TD>
165 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#decodeWithState(com.google.zxing.MonochromeBitmapSource)">decodeWithState</A></B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A> image)</CODE>
168 Decode an image using the state set up by calling setHints() previously.</TD>
170 <TR BGCOLOR="white" CLASS="TableRowColor">
171 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
172 <CODE> void</CODE></FONT></TD>
173 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#setHints(java.util.Hashtable)">setHints</A></B>(java.util.Hashtable hints)</CODE>
176 This method adds state to the MultiFormatReader.</TD>
179 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
180 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
181 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
182 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
184 <TR BGCOLOR="white" CLASS="TableRowColor">
185 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
191 <!-- ========= CONSTRUCTOR DETAIL ======== -->
193 <A NAME="constructor_detail"><!-- --></A>
194 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
195 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
196 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
197 <B>Constructor Detail</B></FONT></TH>
201 <A NAME="MultiFormatReader()"><!-- --></A><H3>
202 MultiFormatReader</H3>
204 public <B>MultiFormatReader</B>()</PRE>
208 <!-- ============ METHOD DETAIL ========== -->
210 <A NAME="method_detail"><!-- --></A>
211 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
212 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
213 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
214 <B>Method Detail</B></FONT></TH>
218 <A NAME="decode(com.google.zxing.MonochromeBitmapSource)"><!-- --></A><H3>
221 public <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A> <B>decode</B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A> image)
222 throws <A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></PRE>
224 <DD>This version of decode honors the intent of Reader.decode(MonochromeBitmapSource) in that it
225 passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly.
226 Use setHints() followed by decodeWithState() for continuous scan applications.
229 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/google/zxing/Reader.html#decode(com.google.zxing.MonochromeBitmapSource)">decode</A></CODE> in interface <CODE><A HREF="../../../com/google/zxing/Reader.html" title="interface in com.google.zxing">Reader</A></CODE></DL>
232 <DT><B>Parameters:</B><DD><CODE>image</CODE> - The pixel data to decode
233 <DT><B>Returns:</B><DD>The contents of the image
235 <DD><CODE><A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></CODE> - Any errors which occurred</DL>
240 <A NAME="decode(com.google.zxing.MonochromeBitmapSource, java.util.Hashtable)"><!-- --></A><H3>
243 public <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A> <B>decode</B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A> image,
244 java.util.Hashtable hints)
245 throws <A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></PRE>
247 <DD>Decode an image using the hints provided. Does not honor existing state.
250 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/google/zxing/Reader.html#decode(com.google.zxing.MonochromeBitmapSource, java.util.Hashtable)">decode</A></CODE> in interface <CODE><A HREF="../../../com/google/zxing/Reader.html" title="interface in com.google.zxing">Reader</A></CODE></DL>
253 <DT><B>Parameters:</B><DD><CODE>image</CODE> - The pixel data to decode<DD><CODE>hints</CODE> - The hints to use, clearing the previous state.
254 <DT><B>Returns:</B><DD>The contents of the image
256 <DD><CODE><A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></CODE> - Any errors which occurred</DL>
261 <A NAME="decodeWithState(com.google.zxing.MonochromeBitmapSource)"><!-- --></A><H3>
264 public <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A> <B>decodeWithState</B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A> image)
265 throws <A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></PRE>
267 <DD>Decode an image using the state set up by calling setHints() previously. Continuous scan
268 clients will get a <b>large</b> speed increase by using this instead of decode().
274 <DT><B>Parameters:</B><DD><CODE>image</CODE> - The pixel data to decode
275 <DT><B>Returns:</B><DD>The contents of the image
277 <DD><CODE><A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></CODE> - Any errors which occurred</DL>
282 <A NAME="setHints(java.util.Hashtable)"><!-- --></A><H3>
285 public void <B>setHints</B>(java.util.Hashtable hints)</PRE>
287 <DD>This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls
288 to decodeWithState(image) can reuse the same set of readers without reallocating memory. This
289 is important for performance in continuous scan clients.
295 <DT><B>Parameters:</B><DD><CODE>hints</CODE> - The set of hints to use for subsequent calls to decode(image)</DL>
298 <!-- ========= END OF CLASS DATA ========= -->
302 <!-- ======= START OF BOTTOM NAVBAR ====== -->
303 <A NAME="navbar_bottom"><!-- --></A>
304 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
305 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
307 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
308 <A NAME="navbar_bottom_firstrow"><!-- --></A>
309 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
310 <TR ALIGN="center" VALIGN="top">
311 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
312 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
313 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
314 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
315 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
316 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
317 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
321 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
322 <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-788492-5"); pageTracker._initData(); pageTracker._trackPageview(); </script></EM>
327 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
328 <A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing"><B>PREV CLASS</B></A>
329 <A HREF="../../../com/google/zxing/MultiFormatWriter.html" title="class in com.google.zxing"><B>NEXT CLASS</B></A></FONT></TD>
330 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
331 <A HREF="../../../index.html?com/google/zxing/MultiFormatReader.html" target="_top"><B>FRAMES</B></A>
332 <A HREF="MultiFormatReader.html" target="_top"><B>NO FRAMES</B></A>
333 <SCRIPT type="text/javascript">
336 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
341 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
348 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
349 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
350 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
351 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
354 <A NAME="skip-navbar_bottom"></A>
355 <!-- ======== END OF BOTTOM NAVBAR ======= -->