var image =plugins.images.getImage(byteArray_or_file_or_filename);//loads the imageimage =image.flip(0);//flip verticallyvar bytes =image.getData();//gets the image bytesplugins.file.writeFile('filename',bytes);//saves the image bytes
var image =plugins.images.getImage(byteArray_or_file_or_filename);//loads the imageimage =image.resize(200,200);//resizes it to 200,200var bytes =image.getData();//gets the image bytesplugins.file.writeFile('filename',bytes);//saves the image bytes
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 supportedvar 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 dataproviderthumbnail =image.getMetaDataObject("Exif - Thumbnail Data"); // gets thumbnail data from the image
getMetaDataObject(property)
Gets the real object of a metadata property from the image. Currently only jpg is supported.
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 supportedvar 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 dataproviderthumbnail =image.getMetaDataObject("Exif - Thumbnail Data"); // gets thumbnail data from the image
getMetaDataProperties()
Gets the available metadata properties from the image. Currently only jpg is supported.
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 supportedvar 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 dataproviderthumbnail =image.getMetaDataObject("Exif - Thumbnail Data"); // gets thumbnail data from the image
var image =plugins.images.getImage(byteArray_or_file_or_filename);//loads the imageimage =image.resize(200,200);//resizes it to 200,200var bytes =image.getData();//gets the image bytesplugins.file.writeFile('filename',bytes);//saves the image bytes
rotate(degrees)
Rotates the image the number of degrees that is given. A new JSImage is returned.
var image =plugins.images.getImage(byteArray_or_file_or_filename);//loads the imageimage =image.rotate(90);//rotate the image 90 degreesvar bytes =image.getData();//gets the image bytesplugins.file.writeFile('filename',bytes);//saves the image bytes