Changes

Jump to navigation Jump to search
597 bytes added ,  09:49, 29 October 2016
Line 2,005: Line 2,005:  
<pre>normalize=</pre>
 
<pre>normalize=</pre>
 
==== Cropping a photo ====
 
==== Cropping a photo ====
 +
==== Performing OCR on a photo ====
 +
<pre>
 +
$.post('/cgi/ingredients.pl',
 +
{code: code, id: imagefield, process_image:1 }, function(data) {
 +
 +
if (data.status == 0) {
 +
$('div[id="ocrbuttondiv_' + imagefield +'"]').html(Lang.extracted_ingredients_ok);
 +
var ingredients_text_id = imagefield.replace("ingredients","ingredients_text");
 +
$("#" + ingredients_text_id).val(data.ingredients_text_from_image);
 +
}
 +
else {
 +
$('div[id="ocrbuttondiv_' + imagefield +'"]').html(Lang.extracted_ingredients_nok);
 +
}
 +
$(document).foundation('equalizer', 'reflow');
 +
}, 'json');
 +
</pre>
    
=== Posting a new product ===
 
=== Posting a new product ===

Navigation menu