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.
quaggaJS/v1.0.0-beta.1/examples/file_input/index.html

87 lines
3.5 KiB
HTML

---
layout: examples.v1.0.0-beta.1
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.
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>This also works great on a wide range of mobile-phones where the
camera access through <code>getUserMedia</code> is still very
limited. </p>
<p>If the default configuration does not suit your use-case, you can
adjust various parameters of the localization and decoding process.</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="code_39_vin">Code 39 VIN</option>
<option value="ean">EAN</option>
<option value="ean_extended">EAN-extended</option>
<option value="ean_8">EAN-8</option>
<option value="upc">UPC</option>
<option value="upc_e">UPC-E</option>
<option value="codabar">Codabar</option>
<option value="i2of5">ITF</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">
<canvas class="drawing" />
</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>