NevronOpenVision
Nevron.Nov.Graphics Namespace / NRaster Class / Encode Method / Encode(NImageFormat,NImageEncoderSettings) Method
Specifies the target image format. Cannot be null.
An object that specifies format-specific settings for the image encoder. The target format and the settings type must match. For example in order to encode the image into PNG format you have to pass NImageFormat.Png as imageFormat and an instance of the NPngEncoderSettings type as settings. If this parameter is set to null, the default encoder settings will be used.
In This Topic
    Encode(NImageFormat,NImageEncoderSettings) Method
    In This Topic
    Encodes the raster to the specified image format.
    Syntax

    Parameters

    imageFormat
    Specifies the target image format. Cannot be null.
    settings
    An object that specifies format-specific settings for the image encoder. The target format and the settings type must match. For example in order to encode the image into PNG format you have to pass NImageFormat.Png as imageFormat and an instance of the NPngEncoderSettings type as settings. If this parameter is set to null, the default encoder settings will be used.

    Return Value

    Returns an object containing the encoded image data.
    Remarks
    The method throws an exception if it fails to encode the raster.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also