ImageSaveOptions.ImageSaveOptions

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)
ParameterTypeDescription
saveFormatSaveFileFormatCan be TIFF, PNG, BMP or JPEGSaveFileFormat.

Exceptions

exceptioncondition
ArgumentExceptionThrown 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