You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
3.1 KiB
HTML
76 lines
3.1 KiB
HTML
---
|
|
layout: examples
|
|
title: Demo with file-input
|
|
showInMenu: false
|
|
---
|
|
|
|
|
|
<section id="container" class="container">
|
|
<h3>Working with file-input</h3>
|
|
<p>This example let's you select an image from your local filesystem. QuaggaJS then tries to decode the barcode using
|
|
the preferred method (<strong>Code128</strong>, <strong>EAN
|
|
</strong>, <strong>Code 39</strong> or <strong>Codabar</strong>)
|
|
There is no server interaction needed as the file is simply
|
|
accessed through the <a href="http://www.w3.org/TR/file-upload/">File API</a>.</p>
|
|
<p>This also works great on a wide range of mobile-phones where the camera access through <code>getUserMedia</code> is still very limited.</p>
|
|
<div class="controls">
|
|
<fieldset class="input-group">
|
|
<input type="file" accept="image/*;capture=camera"/>
|
|
<button>Rerun</button>
|
|
</fieldset>
|
|
<fieldset class="reader-config-group">
|
|
<label>
|
|
<span>Barcode-Type</span>
|
|
<select name="decoder_readers">
|
|
<option value="code_128" selected="selected">Code 128</option>
|
|
<option value="code_39">Code 39</option>
|
|
<option value="ean">EAN</option>
|
|
<option value="codabar">Codabar</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Resolution (long side)</span>
|
|
<select name="input-stream_size">
|
|
<option value="320">320px</option>
|
|
<option value="640">640px</option>
|
|
<option selected="selected" value="800">800px</option>
|
|
<option value="1280">1280px</option>
|
|
<option value="1600">1600px</option>
|
|
<option value="1920">1920px</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Patch-Size</span>
|
|
<select name="locator_patch-size">
|
|
<option value="x-small">x-small</option>
|
|
<option value="small">small</option>
|
|
<option selected="selected" value="medium">medium</option>
|
|
<option value="large">large</option>
|
|
<option value="x-large">x-large</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Half-Sample</span>
|
|
<input type="checkbox" name="locator_half-sample" />
|
|
</label>
|
|
<label>
|
|
<span>Workers</span>
|
|
<select name="numOfWorkers">
|
|
<option value="0">0</option>
|
|
<option value="1" selected="selected">1</option>
|
|
<option value="2">2</option>
|
|
<option value="4">4</option>
|
|
<option value="8">8</option>
|
|
</select>
|
|
</label>
|
|
</fieldset>
|
|
</div>
|
|
<div id="result_strip">
|
|
<ul class="thumbnails"></ul>
|
|
</div>
|
|
<div id="interactive" class="viewport"></div>
|
|
</section>
|
|
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
|
|
<script src="js/quagga.min.js" type="text/javascript"></script>
|
|
<script src="file_input.js" type="text/javascript"></script>
|