 |
RawImageDataCreateOrResize Method |
Static method that creates a new RawImageData or resizes the existing one.
Namespace: Ab4d.SharpEngine.CommonAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntaxpublic static RawImageData CreateOrResize(
RawImageData? existingRawImageData,
int width,
int height,
int imageRowStride,
Format format = Format.B8G8R8A8Unorm,
bool alwaysRecreateDataArray = false
)
Parameters
- existingRawImageData RawImageData
- when set, then the RawImageData is resized if needed; when null a new RawImageData is created
- width Int32
- width
- height Int32
- height
- imageRowStride Int32
- imageRowStride (pixel size in bytes * width)
- format Format (Optional)
- format
- alwaysRecreateDataArray Boolean (Optional)
- when false (by default) then the existing Data array is preserved if its size is bigger or equal to dataLength. When true then new Data array is always created.
Return Value
RawImageDataexistingRawImageData or new RawImageData
See Also