NevronOpenVision
Nevron.Nov.Graphics Namespace / NRaster Class / Convert Method / Convert(NPixelFormat,Int32,Boolean) Method
The target pixel format of the destination raster.
The stride of the destination raster (in bytes).
Specifies wheteher a copy of this raster must be returned in case that conversion is not necessary.
Convert(NPixelFormat,Int32,Boolean) Method
Creates a raster with the specified pixel format and stride, using the current raster as a source.
Syntax
public NRaster Convert( 
   NPixelFormat destFormat,
   System.int destStride,
   System.bool copySource
)

Parameters

destFormat
The target pixel format of the destination raster.
destStride
The stride of the destination raster (in bytes).
copySource
Specifies wheteher a copy of this raster must be returned in case that conversion is not necessary.

Return Value

Returns a NRaster object containing the image data from the current raster, but converted to the pixel format specified by destFormat and using the stride specified by destStride. If there is no need for actual conversions and copySource is set to false - then a reference to the current raster is returned.
Remarks
Throws an exception if either the source or the destination pixel format is not convertible.
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