{div:style=display:none}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR{div}
{div:id=description}{div}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSImage]{td}{td}[#flip]\(type)
Flips the image verticaly (type param=0) or horizontaly (type param=1).{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getContentType]\()
Gets the contenttype (image/jpeg) of this image.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#getData]\()
Gets the bytes of this image, so that they can be saved to disk or stored the database.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getHeight]\()
Gets the height of this image.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getMetaDataDescription]\(property)
Gets the description of a metadata property from the image.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getMetaDataObject]\(property)
Gets the real object of a metadata property from the image.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getMetaDataProperties]\()
Gets the available metadata properties from the image.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getWidth]\()
Gets the width of this image.{td}{tr}{tbody}{tbody}{tr}{td}[JSImage]{td}{td}[#resize]\(width, height)
Resizes the image to the width/height given, keeping aspect ratio.{td}{tr}{tbody}{tbody}{tr}{td}[JSImage]{td}{td}[#rotate]\(degrees)
Rotates the image the number of degrees that is given.{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=flip-Number}{tr:id=name}{td}h6.flip{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSImage]{span}{span:style=font-weight: bold;}flip{span}{span}\(type){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} type
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSImage]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file_or_filename);//loads the image
image = image.flip(0);//flip vertically
var bytes = image.getData();//gets the image bytes
plugins.file.writeFile('filename',bytes);//saves the image bytes
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getContentType}{tr:id=name}{td}h6.getContentType{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getContentType{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getData}{tr:id=name}{td}h6.getData{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}getData{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file_or_filename);//loads the image
image = image.resize(200,200);//resizes it to 200,200
var bytes = image.getData();//gets the image bytes
plugins.file.writeFile('filename',bytes);//saves the image bytes
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getHeight}{tr:id=name}{td}h6.getHeight{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}getHeight{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMetaDataDescription-String}{tr:id=name}{td}h6.getMetaDataDescription{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getMetaDataDescription{span}{span}\(property){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} property
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file_or_filename);//loads the image
// get the available metadata properties from the image, currently only jpg is supported
var propertiesArray = image.getMetaDataProperties();
for(var i=0;i<propertiesArray.length;i++)
{
	var property = propertiesArray[i]
	application.output("property: " + property);
	application.output("description (string): " + image.getMetaDataDescription(property))
	application.output("real object: " + image.getMetaDataObject(property))
}
// Thumbnail data is stored under property 'Exif - Thumbnail Data', extract that and set it in a dataprovider
thumbnail = image.getMetaDataObject("Exif - Thumbnail Data"); // gets thumbnail data from the image
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMetaDataObject-String}{tr:id=name}{td}h6.getMetaDataObject{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}getMetaDataObject{span}{span}\(property){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} property
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file_or_filename);//loads the image
// get the available metadata properties from the image, currently only jpg is supported
var propertiesArray = image.getMetaDataProperties();
for(var i=0;i<propertiesArray.length;i++)
{
	var property = propertiesArray[i]
	application.output("property: " + property);
	application.output("description (string): " + image.getMetaDataDescription(property))
	application.output("real object: " + image.getMetaDataObject(property))
}
// Thumbnail data is stored under property 'Exif - Thumbnail Data', extract that and set it in a dataprovider
thumbnail = image.getMetaDataObject("Exif - Thumbnail Data"); // gets thumbnail data from the image
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMetaDataProperties}{tr:id=name}{td}h6.getMetaDataProperties{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getMetaDataProperties{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file_or_filename);//loads the image
// get the available metadata properties from the image, currently only jpg is supported
var propertiesArray = image.getMetaDataProperties();
for(var i=0;i<propertiesArray.length;i++)
{
	var property = propertiesArray[i]
	application.output("property: " + property);
	application.output("description (string): " + image.getMetaDataDescription(property))
	application.output("real object: " + image.getMetaDataObject(property))
}
// Thumbnail data is stored under property 'Exif - Thumbnail Data', extract that and set it in a dataprovider
thumbnail = image.getMetaDataObject("Exif - Thumbnail Data"); // gets thumbnail data from the image
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getWidth}{tr:id=name}{td}h6.getWidth{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}getWidth{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=resize-Number_Number}{tr:id=name}{td}h6.resize{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSImage]{span}{span:style=font-weight: bold;}resize{span}{span}\(width, height){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} width
\{[Number]} height
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSImage]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file_or_filename);//loads the image
image = image.resize(200,200);//resizes it to 200,200
var bytes = image.getData();//gets the image bytes
plugins.file.writeFile('filename',bytes);//saves the image bytes
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=rotate-Number}{tr:id=name}{td}h6.rotate{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSImage]{span}{span:style=font-weight: bold;}rotate{span}{span}\(degrees){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} degrees
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSImage]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file_or_filename);//loads the image
image = image.rotate(90);//rotate the image 90 degrees
var bytes = image.getData();//gets the image bytes
plugins.file.writeFile('filename',bytes);//saves the image bytes
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}