ToBitmap

BmpImage.ToBitmap method

Converts raster image to the bitmap.

public override Bitmap ToBitmap()

Return Value

The bitmap

Examples

The following example converts a BMP image to a GDI bitmap.

[C#]

using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(@"c:\temp\sample.bmp"))
{
    Aspose.Imaging.FileFormats.Bmp.BmpImage bmpImage = (Aspose.Imaging.FileFormats.Bmp.BmpImage)image;
    System.Drawing.Bitmap bitmap = bmpImage.ToBitmap();

    // Process the GDI bitmap.
}

See Also