Create

Image.Create method (1 of 3)

Creates a new image using the specified create options.

public static Image Create(ImageOptionsBase imageOptions, int width, int height)
ParameterTypeDescription
imageOptionsImageOptionsBaseThe image options.
widthInt32The width.
heightInt32The height.

Return Value

The newly created image.

Examples

This example creates a new Image file at some disk location as specified by Source property of the BmpOptions instance. Several properties for BmpOptions 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 BmpOptions and set its various properties
Aspose.Imaging.ImageOptions.BmpOptions bmpOptions = new Aspose.Imaging.ImageOptions.BmpOptions();
bmpOptions.BitsPerPixel = 24;

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

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

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

See Also


Image.Create method (2 of 3)

Creates a new image using the specified images as pages

public static Image Create(Image[] images)
ParameterTypeDescription
imagesImage[]The images.

Return Value

The Image as IMultipageImage

See Also


Image.Create method (3 of 3)

Creates a new image the specified images as pages.

public static Image Create(Image[] images, bool disposeImages)
ParameterTypeDescription
imagesImage[]The images.
disposeImagesBooleanif set to true [dispose images].

Return Value

The Image as IMultipageImage

See Also