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

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


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

Return Value

Type: Image
The newly created image.
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.

//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
See Also