ImageCreate Method
Creates a new image using the specified create options.

Namespace: Aspose.PSD
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 20.6
Syntax
public static Image Create(
	ImageOptionsBase imageOptions,
	int width,
	int height
)

Parameters

imageOptions
Type: Aspose.PSDImageOptionsBase
The image options.
width
Type: SystemInt32
The width.
height
Type: SystemInt32
The height.

Return Value

Type: Image
The newly created image.
Examples
This example creates a new Image file at some disk location as specified by Source property of the PsdOptions instance. Several properties for PsdOptions instance are set before creating the actual image. Especially the Source property, that refers to the actual disk location in this case.
[C#]

//Create an instance of PsdOptions and set its various properties
Aspose.PSD.ImageOptions.PsdOptions psdOptions = new Aspose.PSD.ImageOptions.PsdOptions();

//Create an instance of FileCreateSource and assign it as Source for the instance of PsdOptions
//Second Boolean parameter determines if the file to be created IsTemporal or not
psdOptions.Source = new Aspose.PSD.Sources.FileCreateSource(@"C:\temp\sample.psd", false);

//Create an instance of Image and initialize it with instance of PsdOptions by calling Create method
using (Aspose.PSD.Image image = Aspose.PSD.Image.Create(psdOptions, 500, 500))
{
    //do some image processing

    // save all changes
    image.Save();
}
See Also