Image.Create

Create(ImageOptionsBase, int, int)

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


Create(Image[])

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


Create(MultipageCreateOptions)

Creates the specified multipage create options.

public static Image Create(MultipageCreateOptions multipageCreateOptions)
ParameterTypeDescription
multipageCreateOptionsMultipageCreateOptionsThe multipage create options.

Return Value

The multipage image

See Also


Create(string[], bool)

Creates the multipage image containing the specified files.

public static Image Create(string[] files, bool throwExceptionOnLoadError)
ParameterTypeDescription
filesString[]The files.
throwExceptionOnLoadErrorBooleanif set to true [throw exception on load error].

Return Value

The multipage image

See Also


Create(string[])

Creates the multipage image containing the specified files.

public static Image Create(string[] files)
ParameterTypeDescription
filesString[]The files.

Return Value

The multipage image

See Also


Create(Image[], bool)

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