Height of the image (pixels).
Size of the image (bytes).
Metadata associated with the image.
Size of the image (bytes).
Width of the image (pixels).
Stores the image object in a file.
var myImage = loadImage( 'PROJECT/my-image.jpg' );
myImage.save( 'PROJECT/my-saved-image.jpg' );
var myImage = loadImage( 'PROJECT/my-image.jpg' );
myImage.save( 'PROJECT/my-png-image.png', 'image/png' );
Path to the file where to save the image
New mime type to apply
Stores the image object in a file.
var myFile = new File( 'PROJECT/my-saved-image.jpg' );
var myImage = loadImage( 'PROJECT/my-image.jpg' );
myImage.save( myFile );
var myFile = new File( 'PROJECT/my-png-image.png' );
var myImage = loadImage( 'PROJECT/my-image.jpg' );
myImage.save( myFile, 'image/png' );
File object where to save the image
New mime type to apply
Updates the image metadata.
var myImage = loadImage( 'PROJECT/my-image.jpg' );
var newMeta = { IPTC: { Keywords: ['vacation', 'snow']}};
myImage.saveMeta( newMeta );
myImage.save( 'PROJECT/my-meta-image.jpg' );
Object containing the meta to update
Returns a thumbnail of the source image.
var myImage = loadImage( 'PROJECT/my-image.jpg' );
var myThumbnail = myImage.thumbnail( 50, 50 );
myThumbnail.save( 'PROJECT/my-thumbnail.jpg' );
var myImage = loadImage( 'PROJECT/my-image.jpg' );
var myThumbnail = myImage.thumbnail( 50, 50, 2 );
myThumbnail.save( 'PROJECT/my-thumbnail.jpg' );
(pixels) Thumbnail width
(pixels) Thumbnai height
(default: 6) Scale mode to apply. See doc center for more details.
The Image API is partially supported on Linux platforms: