[SecurityCriticalAttribute]
public static IReadWriteBitmapData CreateBitmapData(
IntPtr buffer,
Size size,
int stride,
PixelFormatInfo pixelFormatInfo,
Func<ICustomBitmapDataRow, int, int>? rowGetColorIndex,
Action<ICustomBitmapDataRow, int, int>? rowSetColorIndex,
Palette? palette = null,
Func<Palette, bool>? trySetPaletteCallback = null,
Action? disposeCallback = null
)
<SecurityCriticalAttribute>
Public Shared Function CreateBitmapData (
buffer As IntPtr,
size As Size,
stride As Integer,
pixelFormatInfo As PixelFormatInfo,
rowGetColorIndex As Func(Of ICustomBitmapDataRow, Integer, Integer),
rowSetColorIndex As Action(Of ICustomBitmapDataRow, Integer, Integer),
Optional palette As Palette = Nothing,
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,
PixelFormatInfo pixelFormatInfo,
Func<ICustomBitmapDataRow^, int, int>^ rowGetColorIndex,
Action<ICustomBitmapDataRow^, int, int>^ rowSetColorIndex,
Palette^ palette = nullptr,
Func<Palette^, bool>^ trySetPaletteCallback = nullptr,
Action^ disposeCallback = nullptr
)
[<SecurityCriticalAttribute>]
static member CreateBitmapData :
buffer : IntPtr *
size : Size *
stride : int *
pixelFormatInfo : PixelFormatInfo *
rowGetColorIndex : Func<ICustomBitmapDataRow, int, int> *
rowSetColorIndex : Action<ICustomBitmapDataRow, int, int> *
?palette : Palette *
?trySetPaletteCallback : Func<Palette, bool> *
?disposeCallback : Action
(* Defaults:
let _palette = defaultArg palette null
let _trySetPaletteCallback = defaultArg trySetPaletteCallback null
let _disposeCallback = defaultArg disposeCallback null
*)
-> IReadWriteBitmapData
ArgumentNullException | buffer is IntPtr.Zero -or- Both rowGetColorIndex and rowSetColorIndex are . |
ArgumentOutOfRangeException | size has a zero or negative width or height
-or- The absolute value of stride is too small for the specified width and pixelFormatInfo. |
ArgumentException | palette is too large for the specified PixelFormat -or- pixelFormatInfo is not indexed or its BitsPerPixel is not between 1 and 16. |