ImageGear v26.5 - Updated
ImageGear.Core Assembly / ImageGear.Processing Namespace / ImGearRasterProcessing Class / Export Method / Export(ImGearRasterPage,Int32,Int32) Method
Raster page to be exported.
Specifies horizontal resolution of resulting GDI+ bitmap object. Measurement unit is PPM, i.e., pixels per meter.
Specifies vertical resolution of resulting GDI+ bitmap object. Measurement unit is PPM, i.e., pixels per meter.
Example




In This Topic
    Export(ImGearRasterPage,Int32,Int32) Method
    In This Topic
    Exports content of raster page to managed GDI+ image.
    Syntax
    'Declaration
     
    Public Overloads Shared Function Export( _
       ByVal page As ImGearRasterPage, _
       ByVal ppmX As Integer, _
       ByVal ppmY As Integer _
    ) As Bitmap
    'Usage
     
    Dim page As ImGearRasterPage
    Dim ppmX As Integer
    Dim ppmY As Integer
    Dim value As Bitmap
     
    value = ImGearRasterProcessing.Export(page, ppmX, ppmY)
    public static Bitmap Export( 
       ImGearRasterPage page,
       int ppmX,
       int ppmY
    )
    public: static Bitmap* Export( 
       ImGearRasterPage* page,
       int ppmX,
       int ppmY
    ) 
    public:
    static Bitmap^ Export( 
       ImGearRasterPage^ page,
       int ppmX,
       int ppmY
    ) 

    Parameters

    page
    Raster page to be exported.
    ppmX
    Specifies horizontal resolution of resulting GDI+ bitmap object. Measurement unit is PPM, i.e., pixels per meter.
    ppmY
    Specifies vertical resolution of resulting GDI+ bitmap object. Measurement unit is PPM, i.e., pixels per meter.

    Return Value

    An instance of System.Drawing.Bitmap class.
    Remarks
    Since Bitmap stores pixels in RGB or Indexed format only, color space conversion is used to transfer image data.
    Example
    // Source rectangle to export.
    ImGearRectangle igRectangleSource = new ImGearRectangle(igRasterPage.DIB.Width, igRasterPage.DIB.Height);
    // Destination rectangle to export.
    ImGearRectangle igRectangleDestination = new ImGearRectangle(32, 32);
    ImGearChannelRange igChannelRange = new ImGearChannelRange(0, igRasterPage.DIB.ChannelCount);
    // Export the image to a bitmap and assign that to a standard picturebox.
    Bitmap bitmapExport = ImGearRasterProcessing.Export(igRasterPage, 2834, 2834);
    bitmapForm.pictureBox1.Image = bitmapExport;
    ' Source rectangle to export.
    Dim igRectangleSource As New ImGearRectangle(igRasterPage.DIB.Width, igRasterPage.DIB.Height)
    ' Destination rectangle to export.
    Dim igRectangleDestination As New ImGearRectangle(32, 32)
    Dim igChannelRange As New ImGearChannelRange(0, igRasterPage.DIB.ChannelCount)
    ' Export the image to a bitmap and assign that to a standard picturebox.
    Dim bitmapExport As Bitmap = ImGearRasterProcessing.Export(igRasterPage, 2834, 2834)
    bitmapForm1.PictureBox1.Image = bitmapExport
    See Also