[SecurityCriticalAttribute]
public static IReadWriteBitmapData CreateBitmapData(
IntPtr buffer,
Size size,
int stride,
KnownPixelFormat pixelFormat,
Palette? palette,
Func<Palette, bool>? trySetPaletteCallback = null,
Action? disposeCallback = null
)
<SecurityCriticalAttribute>
Public Shared Function CreateBitmapData (
buffer As IntPtr,
size As Size,
stride As Integer,
pixelFormat As KnownPixelFormat,
palette As Palette,
Optional trySetPaletteCallback As Func(Of Palette, Boolean) = Nothing,
Optional disposeCallback As Action = Nothing
) As IReadWriteBitmapData
public:
[SecurityCriticalAttribute]
static IReadWriteBitmapData^ CreateBitmapData(
IntPtr buffer,
Size size,
int stride,
KnownPixelFormat pixelFormat,
Palette^ palette,
Func<Palette^, bool>^ trySetPaletteCallback = nullptr,
Action^ disposeCallback = nullptr
)
[<SecurityCriticalAttribute>]
static member CreateBitmapData :
buffer : IntPtr *
size : Size *
stride : int *
pixelFormat : KnownPixelFormat *
palette : Palette *
?trySetPaletteCallback : Func<Palette, bool> *
?disposeCallback : Action
(* Defaults:
let _trySetPaletteCallback = defaultArg trySetPaletteCallback null
let _disposeCallback = defaultArg disposeCallback null
*)
-> IReadWriteBitmapData
ArgumentNullException | buffer is IntPtr.Zero. |
ArgumentOutOfRangeException | size has a zero or negative width or height
-or- pixelFormat is not one of the valid formats -or- The absolute value of stride is too small for the specified width and pixelFormat. |
ArgumentException | buffer is too small for the specified size, pixelFormat and stride -or- The absolute value of stride is too small for the specified width and pixelFormat -or- palette is too large for the specified pixelFormat. |