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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7}{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:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_des|text=|trigger=button}{sub-section}{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_des|trigger=none|class=sIndent}Gets the contenttype (image/jpeg) of this image.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_ret|text=|trigger=button}{sub-section}{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_see|text=|trigger=button}{sub-section}{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_see|text=|trigger=button}{sub-section}{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_sam|text=|trigger=button}{sub-section}{sub-section:6E3D0AC6-0ADC-438D-9B7F-EBBF934F1DD7_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F}{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:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_des|text=|trigger=button}{sub-section}{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_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=prs}{td}*Parameters*\\{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_ret|text=|trigger=button}{sub-section}{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_see|text=|trigger=button}{sub-section}{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_see|text=|trigger=button}{sub-section}{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_sam|text=|trigger=button}{sub-section}{sub-section:5FAE8D12-E7F6-48A8-B082-CEB96B36DF6F_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AFF0FA57-1066-456E-B339-0A2225E5B06F}{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:AFF0FA57-1066-456E-B339-0A2225E5B06F_des|text=|trigger=button}{sub-section}{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_des|trigger=none|class=sIndent}Gets the height of this image.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_ret|text=|trigger=button}{sub-section}{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_see|text=|trigger=button}{sub-section}{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_see|text=|trigger=button}{sub-section}{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_sam|text=|trigger=button}{sub-section}{sub-section:AFF0FA57-1066-456E-B339-0A2225E5B06F_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AF113A10-9BDF-4D39-AA6E-D7D716E04BA0}{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;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_des|text=|trigger=button}{sub-section}{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_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=prs}{td}*Parameters*\\{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_ret|text=|trigger=button}{sub-section}{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_see|text=|trigger=button}{sub-section}{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_see|text=|trigger=button}{sub-section}{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_sam|text=|trigger=button}{sub-section}{sub-section:AF113A10-9BDF-4D39-AA6E-D7D716E04BA0_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FC520BB7-369B-47D4-8D81-48CCC201383C}{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;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_des|text=|trigger=button}{sub-section}{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_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=prs}{td}*Parameters*\\{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_ret|text=|trigger=button}{sub-section}{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_ret|trigger=none|class=sIndent}Object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_see|text=|trigger=button}{sub-section}{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_see|text=|trigger=button}{sub-section}{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_sam|text=|trigger=button}{sub-section}{sub-section:FC520BB7-369B-47D4-8D81-48CCC201383C_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0544DA74-C6B7-4337-B3D8-CE6084DEB177}{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:0544DA74-C6B7-4337-B3D8-CE6084DEB177_des|text=|trigger=button}{sub-section}{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_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=prs}{td}*Parameters*\\{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_ret|text=|trigger=button}{sub-section}{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_see|text=|trigger=button}{sub-section}{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_see|text=|trigger=button}{sub-section}{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_sam|text=|trigger=button}{sub-section}{sub-section:0544DA74-C6B7-4337-B3D8-CE6084DEB177_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=38C41CCB-CB38-441F-8CEF-0F8EB323723A}{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:38C41CCB-CB38-441F-8CEF-0F8EB323723A_des|text=|trigger=button}{sub-section}{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_des|trigger=none|class=sIndent}Gets the width of this image.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_ret|text=|trigger=button}{sub-section}{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_see|text=|trigger=button}{sub-section}{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_see|text=|trigger=button}{sub-section}{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_sam|text=|trigger=button}{sub-section}{sub-section:38C41CCB-CB38-441F-8CEF-0F8EB323723A_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7F435B52-903B-4793-832C-6F19CB81C27E}{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:7F435B52-903B-4793-832C-6F19CB81C27E_des|text=|trigger=button}{sub-section}{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_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}{tr:id=prs}{td}*Parameters*\\{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_prs|trigger=none}width
height
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_ret|text=|trigger=button}{sub-section}{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_ret|trigger=none|class=sIndent}[JSImage]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_see|text=|trigger=button}{sub-section}{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_see|text=|trigger=button}{sub-section}{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_sam|text=|trigger=button}{sub-section}{sub-section:7F435B52-903B-4793-832C-6F19CB81C27E_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=50CCD858-66A4-430D-AEBF-4EF0B1283F3C}{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:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_des|text=|trigger=button}{sub-section}{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_des|trigger=none|class=sIndent}Rotates the image the number of degrees that is given. A new JSImage is returned.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_prs|trigger=none}degrees
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_ret|text=|trigger=button}{sub-section}{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_ret|trigger=none|class=sIndent}[JSImage]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_see|text=|trigger=button}{sub-section}{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_see|text=|trigger=button}{sub-section}{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_sam|text=|trigger=button}{sub-section}{sub-section:50CCD858-66A4-430D-AEBF-4EF0B1283F3C_sam|class=sIndent|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
// 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) |
---|
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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |