ImageSaveOptions.ImageSaveOptions
Contents
[
Hide
]ImageSaveOptions constructor
Initializes a new instance of the ImageSaveOptions
class which can be used to save rendered images in TIFF, PNG, BMP or JPEG formats.
public ImageSaveOptions(SaveFileFormat saveFormat)
Parameter | Type | Description |
---|---|---|
saveFormat | SaveFileFormat | Can be TIFF, PNG, BMP or JPEGSaveFileFormat . |
Exceptions
exception | condition |
---|---|
ArgumentException | Thrown of saveFormat is not a valid image format. The valid values are TIFF, PNG, BMP or JPEG. |
Examples
Shows how to save project into a stream as an image.
var project = new Project();
using (var stream = new FileStream(OutDir + "EmptyProjectSaveStream_out.xml", FileMode.Create, FileAccess.Write))
{
var options = new ImageSaveOptions(SaveFileFormat.Png);
// by using of ImageSaveOptions we save the project into image format
project.Save(stream, options);
}
See Also
- enum SaveFileFormat
- class ImageSaveOptions
- namespace Aspose.Tasks.Saving
- assembly Aspose.Tasks