Changes

Jump to navigation Jump to search
585 bytes added ,  09:32, 29 October 2016
Line 1,973: Line 1,973:     
=== Manipulating photos for a product ===
 
=== Manipulating photos for a product ===
 +
<pre>function update_image(imagefield) {
 +
 +
$('#crop_' + imagefield).attr("src","/cgi/product_image_rotate.pl?code=" + code + "&imgid=" + imagefield_imgid[imagefield]
 +
+ "&angle=" + angles[imagefield] + "&normalize=" + $("#normalize_" + imagefield).prop('checked')
 +
+ "&white_magic=" + $("#white_magic_" + imagefield).prop('checked') );
 +
$('div[id="cropbuttonmsg_' + imagefield +'"]').hide();
 +
}
 +
</pre>
 
==== Understanding multilingual products ====
 
==== Understanding multilingual products ====
 
Multilingual products can have several photos based on languages present on the packaging. Just suffix the lang code to our examples to get the relevant language(s).
 
Multilingual products can have several photos based on languages present on the packaging. Just suffix the lang code to our examples to get the relevant language(s).
Line 1,983: Line 1,991:  
==== Getting the current nutrition photo ====
 
==== Getting the current nutrition photo ====
 
==== Setting a new current nutrition photo ====
 
==== Setting a new current nutrition photo ====
 +
 +
==== URL for the image manipulation API ====
 +
<pre>/cgi/product_image_rotate.pl?</pre>
 +
==== Choosing the product by barcode ====
 +
<pre>code=</pre>
 
==== Selecting a photo ====
 
==== Selecting a photo ====
 +
<pre>imgid=</pre>
 
==== Rotating a photo ====
 
==== Rotating a photo ====
<pre>/cgi/product_image_rotate.pl?code=</pre>
+
<pre>angle=</pre>
 
   
==== Removing background on a photo ("White magic") ====
 
==== Removing background on a photo ("White magic") ====
 +
<pre>white_magic=</pre>
 
==== Color correction on a photo ====
 
==== Color correction on a photo ====
 +
<pre>normalize=</pre>
 
==== Cropping a photo ====
 
==== Cropping a photo ====
  

Navigation menu