Saving Image files

Skip to end of metadata
Go to start of metadata
This page is no longer maintained. For an updated page, please visit
Aspose.Imaging lets you create image files from scratch. It also provides the means to edit existing image files. Once the image is created or modified, the file is usually saved to disk.

Aspose.Imaging provides you with methods for saving images to a disk by specifying a path or using a Stream object.

If the image is created by specifying any of the ImageOptions in the Image.create static method, the image is automatically saved to the path or stream supplied during the initialization of the Image class.

Saving to Disk

The Image class represents an image object, so this class provides all the tools needed to create, load and save an image file. Use the Image class' Save method to save images. One overloaded version of the Save method accepts the file location as a string. Below is an example of how this can be used.

Programming Sample

//Use the Save method exposed by the Image Class to save the image"C:\\output.bmp");

Saving to a Stream

Another overloaded version of the Save method accepts the Stream object as an argument and saves the image file to the stream.

Programming Sample

//Create an instance of FileOutputStream os = new"C:\\output.bmp");

//Save the image using the Save method exposed by the Image class and pass the outputstream object;
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.