Package com.google.zxing.client.j2se
Class DecodeWorker
java.lang.Object
com.google.zxing.client.j2se.DecodeWorker
One of a pool of threads which pulls images off the Inputs queue and decodes them in parallel.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Path
buildOutputPath
(URI input, String suffix) call()
private Result[]
decode
(URI uri, Map<DecodeHintType, ?> hints) private static void
dumpBlackPoint
(URI uri, BufferedImage image, BinaryBitmap bitmap) Writes out a single PNG which is three times the width of the input image, containing from left to right: the original image, the row sampling monochrome version, and the 2D sampling monochrome version.private static void
dumpResult
(URI input, Result... results) private static void
writeResultImage
(int stride, int height, int[] pixels, URI input, String suffix)
-
Field Details
-
RED
private static final int RED- See Also:
-
BLACK
private static final int BLACK- See Also:
-
WHITE
private static final int WHITE- See Also:
-
config
-
inputs
-
hints
-
-
Constructor Details
-
DecodeWorker
DecodeWorker(DecoderConfig config, Queue<URI> inputs)
-
-
Method Details
-
call
- Specified by:
call
in interfaceCallable<Integer>
- Throws:
IOException
-
buildOutputPath
- Throws:
IOException
-
dumpResult
- Throws:
IOException
-
decode
- Throws:
IOException
-
dumpBlackPoint
private static void dumpBlackPoint(URI uri, BufferedImage image, BinaryBitmap bitmap) throws IOException Writes out a single PNG which is three times the width of the input image, containing from left to right: the original image, the row sampling monochrome version, and the 2D sampling monochrome version.- Throws:
IOException
-
writeResultImage
private static void writeResultImage(int stride, int height, int[] pixels, URI input, String suffix) throws IOException - Throws:
IOException
-