ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 Assembly / C1.Util.DX.WIC Namespace / BitmapFrameEncode Class / WriteSource Method / WriteSource(BitmapSource) Method

The bitmap source to encode.


In This Topic
    WriteSource(BitmapSource) Method
    In This Topic

    Encodes a bitmap source.

    Syntax
    'Declaration
     
    Public Overloads Sub WriteSource( _
       ByVal bitmapSource As BitmapSource _
    ) 
    public void WriteSource( 
       BitmapSource bitmapSource
    )

    Parameters

    bitmapSource

    The bitmap source to encode.

    Remarks

    If SetSize is not called prior to calling WriteSource, the size given in prc is used if not null. Otherwise, the size of the BitmapSource given in pIBitmapSource is used.

    If SetPixelFormat is not called prior to calling WriteSource, the pixel format of the BitmapSource given in pIBitmapSource is used.

    If SetResolution is not called prior to calling WriteSource, the pixel format of pIBitmapSource is used.

    If SetPalette is not called prior to calling WriteSource, the target pixel format is indexed, and the pixel format of pIBitmapSource matches the encoder frame's pixel format, then the pIBitmapSource pixel format is used.

    When encoding a GIF image, if the global palette is set and the frame level palette is not set directly by the user or by a custom independent software vendor (ISV) GIF codec, WriteSource will use the global palette to encode the frame even when pIBitmapSource has a frame level palette.

    Windows Vista:The source rect width must match the width set through SetSize. Repeated WriteSource calls can be made as long as the total accumulated source rect height is the same as set through SetSize.

    See Also