Return Types |
---|
JSImage |
Method Summery | |
---|---|
JSImage | #getImage(file/byte_array/bean/applet/form_element) Get a javascript image/resource object for the given file/bytearray/bean/applet/form_element. |
Method Details |
---|
getImage |
JSImage getImage (file/byte_array/bean/applet/form_element) |
Get a javascript image/resource object for the given file/bytearray/bean/applet/form_element. |
Parameters file/byte_array/bean/applet/form_element |
Returns JSImage |
Samplevar image = plugins.images.getImage(byteArray); var height = image.getHeight(); var contentType = image.getContentType(); var scaled_image = image.resize(30, 30); var snapshot_image = plugins.images.getImage(forms.companyReports.elements.employeesChartBean); var tempFile = plugins.file.createTempFile('bean_snapshot','.jpg') plugins.file.writeFile(tempFile, snapshot_image.getData()) application.setStatusText('Wrote file: '+tempFile) |