Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Flips the image verticaly (type param=0) or horizontaly (type param=1). A new JSImage is returned. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getContentType |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the contenttype (image/jpeg) of this image. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType(); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the bytes of this image, so that they can be saved to disk or stored the database. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var image = plugins.images.getImage(byteArray_or_file_or_filename);//loads the image
image = image. |
|
|
|
| flip0flip verticallyresizes it to 200,200
var bytes = image.getData();//gets the image bytes
plugins.file.writeFile('filename',bytes);//saves the image bytes |
|
|
|
|
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getContentType|class=node}{tr:id=name}{td}h6.getContentType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getContentType{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getContentType_des|trigger=button|text=}{sub-section}{sub-section:getContentType_des|trigger=none|class=sIndent}Gets the contenttype (image/jpeg) of this image.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getContentType_snc|trigger=button|text=}{sub-section}{sub-section:getContentType_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getContentType_prs|trigger=button|text=}{sub-section}{sub-section:getContentType_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getContentType_ret|trigger=button|text=}{sub-section}{sub-section:getContentType_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getContentType_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getContentType_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getContentType_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getContentType_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getContentType_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getContentType_sam|trigger=none}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getData|class=node}{tr:id=name}{td}h6.getData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}getData{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getData_des|trigger=button|text=}{sub-section}{sub-section:getData_des|trigger=none|class=sIndent}Gets the bytes of this image, so that they can be saved to disk or stored the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getData_snc|trigger=button|text=}{sub-section}{sub-section:getData_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getData_prs|trigger=button|text=}{sub-section}{sub-section:getData_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getData_ret|trigger=button|text=}{sub-section}{sub-section:getData_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getData_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getData_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getData_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getData_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getData_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getData_sam|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the height of this image. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType(); |
|
|
|
|
Table Body (tbody) |
---|
id | getMetaDataDescription-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| getMetaDataDescription |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the description of a metadata property from the image. Currently only jpg is supported. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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 |
|
|
|
|
Table Body (tbody) |
---|
id | getMetaDataObject-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the real object of a metadata property from the image. Currently only jpg is supported. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| getMetaDataProperties |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the available metadata properties from the image. Currently only jpg is supported. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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// get the available metadata properties from the image, currently only jpg is supported
var propertiesArray = image. |
|
|
|
| getData//gets the image bytes
plugins.file.writeFile('filename',bytes);//saves the image bytes
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getHeight|class=node}{tr:id=name}{td}h6.getHeight{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getHeight{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getHeight_des|trigger=button|text=}{sub-section}{sub-section:getHeight_des|trigger=none|class=sIndent}Gets the height of this image.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getHeight_snc|trigger=button|text=}{sub-section}{sub-section:getHeight_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getHeight_prs|trigger=button|text=}{sub-section}{sub-section:getHeight_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getHeight_ret|trigger=button|text=}{sub-section}{sub-section:getHeight_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getHeight_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getHeight_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getHeight_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getHeight_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getHeight_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getHeight_sam|trigger=none}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMetaDataDescription|class=node}{tr:id=name}{td}h6.getMetaDataDescription{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getMetaDataDescription{span}{span:id=iets|style=float: left;}\(property){span}{td}{tr}{tr:id=des}{td}{sub-section:getMetaDataDescription_des|trigger=button|text=}{sub-section}{sub-section:getMetaDataDescription_des|trigger=none|class=sIndent}Gets the description of a metadata property from the image. Currently only jpg is supported.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMetaDataDescription_snc|trigger=button|text=}{sub-section}{sub-section:getMetaDataDescription_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getMetaDataDescription_prs|trigger=button|text=}{sub-section}{sub-section:getMetaDataDescription_prs|trigger=none|class=sIndent}\{[String]} property
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getMetaDataDescription_ret|trigger=button|text=}{sub-section}{sub-section:getMetaDataDescription_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMetaDataDescription_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataDescription_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMetaDataDescription_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataDescription_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMetaDataDescription_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataDescription_sam|trigger=none}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMetaDataObject|class=node}{tr:id=name}{td}h6.getMetaDataObject{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getMetaDataObject{span}{span:id=iets|style=float: left;}\(property){span}{td}{tr}{tr:id=des}{td}{sub-section:getMetaDataObject_des|trigger=button|text=}{sub-section}{sub-section:getMetaDataObject_des|trigger=none|class=sIndent}Gets the real object of a metadata property from the image. Currently only jpg is supported.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMetaDataObject_snc|trigger=button|text=}{sub-section}{sub-section:getMetaDataObject_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getMetaDataObject_prs|trigger=button|text=}{sub-section}{sub-section:getMetaDataObject_prs|trigger=none|class=sIndent}\{[String]} property
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getMetaDataObject_ret|trigger=button|text=}{sub-section}{sub-section:getMetaDataObject_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMetaDataObject_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataObject_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMetaDataObject_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataObject_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMetaDataObject_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataObject_sam|trigger=none}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMetaDataProperties|class=node}{tr:id=name}{td}h6.getMetaDataProperties{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getMetaDataProperties{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getMetaDataProperties_des|trigger=button|text=}{sub-section}{sub-section:getMetaDataProperties_des|trigger=none|class=sIndent}Gets the available metadata properties from the image. Currently only jpg is supported.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMetaDataProperties_snc|trigger=button|text=}{sub-section}{sub-section:getMetaDataProperties_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getMetaDataProperties_prs|trigger=button|text=}{sub-section}{sub-section:getMetaDataProperties_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getMetaDataProperties_ret|trigger=button|text=}{sub-section}{sub-section:getMetaDataProperties_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMetaDataProperties_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataProperties_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMetaDataProperties_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataProperties_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMetaDataProperties_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMetaDataProperties_sam|trigger=none}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getWidth|class=node}{tr:id=name}{td}h6.getWidth{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getWidth{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getWidth_des|trigger=button|text=}{sub-section}{sub-section:getWidth_des|trigger=none|class=sIndent}Gets the width of this image.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getWidth_snc|trigger=button|text=}{sub-section}{sub-section:getWidth_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getWidth_prs|trigger=button|text=}{sub-section}{sub-section:getWidth_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getWidth_ret|trigger=button|text=}{sub-section}{sub-section:getWidth_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getWidth_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getWidth_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getWidth_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getWidth_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getWidth_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getWidth_sam|trigger=none}{code:language=javascript}
var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=resize|class=node}{tr:id=name}{td}h6.resize{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSImage]{span}{span:id=iets|style=float: left; font-weight: bold;}resize{span}{span:id=iets|style=float: left;}\(width, height){span}{td}{tr}{tr:id=des}{td}{sub-section:resize_des|trigger=button|text=}{sub-section}{sub-section:resize_des|trigger=none|class=sIndent}Resizes the image to the width/height given, keeping aspect ratio. A new JSImage is returned.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:resize_snc|trigger=button|text=}{sub-section}{sub-section:resize_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:resize_prs|trigger=button|text=}{sub-section}{sub-section:resize_prs|trigger=none|class=sIndent}\{[Number]} width
\{[Number]} height
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:resize_ret|trigger=button|text=}{sub-section}{sub-section:resize_ret|trigger=none|class=sIndent}[JSImage]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:resize_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:resize_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:resize_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:resize_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:resize_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:resize_sam|trigger=none}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=rotate|class=node}{tr:id=name}{td}h6.rotate{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSImage]{span}{span:id=iets|style=float: left; font-weight: bold;}rotate{span}{span:id=iets|style=float: left;}\(degrees){span}{td}{tr}{tr:id=des}{td}{sub-section:rotate_des|trigger=button|text=}{sub-section}{sub-section:rotate_des|trigger=none|class=sIndent}Rotates the image the number of degrees that is given. A new JSImage is returned.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:rotate_snc|trigger=button|text=}{sub-section}{sub-section:rotate_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:rotate_prs|trigger=button|text=}{sub-section}{sub-section:rotate_prs|trigger=none|class=sIndent}\{[Number]} degrees
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:rotate_ret|trigger=button|text=}{sub-section}{sub-section:rotate_ret|trigger=none|class=sIndent}[JSImage]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:rotate_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rotate_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:rotate_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rotate_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:rotate_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rotate_sam|trigger=none}{code:language=javascript}
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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the width of this image. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var image = plugins.images.getImage(byteArray_or_file);
var width = image.getWidth();
var height = image.getHeight();
var contentType = image.getContentType(); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Resizes the image to the width/height given, keeping aspect ratio. A new JSImage is returned. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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 |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Rotates the image the number of degrees that is given. A new JSImage is returned. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |