[]
IWICBitmapSource
[Guid("00000120-a8f2-4877-ba0a-fd2b6645fb94")]
public class BitmapSource : ComObject, IDisposable, IUnknown
Initializes a new instance of the BitmapSource class.
public BitmapSource(IntPtr nativePtr)
nativePtr
System.IntPtrThe native pointer.
Retrieves the pixel width and height of the bitmap.
public Size2L Size { get; }
HRESULT IWICBitmapSource::CopyPalette([In, Optional] IWICPalette* pIPalette)
public bool CopyPalette(Palette paletteRef, bool checkResult = false)
paletteRef
PalettecheckResult
boolInstructs the object to produce pixels.
public void CopyPixels(RectL rectangle, byte[] output, int stride)
rectangle
RectLThe rectangle to copy.
output
byte[]The destination array. The size of the array must be sizeof(pixel) * Width * Height
stride
intThe stride (number of bytes per row).
Instructs the object to produce pixels.
public void CopyPixels(RectL rectangle, int stride, DataPointer dataPointer)
rectangle
RectLThe rectangle to copy. A null
value specifies the entire bitmap.
stride
intThe stride of the bitmap
dataPointer
DataPointerA reference to the buffer.
Instructs the object to produce pixels.
public void CopyPixels(byte[] output, int stride)
output
byte[]The destination array. The size of the array must be sizeof(pixel) * Width * Height
stride
intThe stride (number of bytes per row).
Instructs the object to produce pixels.
public void CopyPixels(int stride, DataPointer dataPointer)
stride
intThe stride of the bitmap
dataPointer
DataPointerA reference to the buffer.
Instructs the object to produce pixels.
public void CopyPixels(int stride, IntPtr dataPointer, int size)
stride
intThe stride of the bitmap
dataPointer
System.IntPtrA reference to the buffer.
size
intSize of the buffer in bytes.
HRESULT IWICBitmapSource::CopyPixels([In] const void* prc,[In] unsigned int cbStride,[In] unsigned int cbBufferSize,[In] void* pbBuffer)
public void CopyPixels(IntPtr rectangleRef, int stride, int bufferSize, IntPtr bufferRef)
rectangleRef
System.IntPtrstride
intbufferSize
intbufferRef
System.IntPtrInstructs the object to produce pixels.
public void CopyPixels<T>(T[] output) where T : struct
output
T[]The destination array. The size of the array must be sizeof(pixel) * Width * Height
T
Instructs the object to produce pixels.
public void CopyPixels<T>(RectL rectangle, T[] output) where T : struct
rectangle
RectLThe rectangle to copy.
output
T[]The destination array. The size of the array must be sizeof(pixel) * rectangle.Width * rectangle.Height
T
HRESULT IWICBitmapSource::GetPixelFormat([Out] GUID* pPixelFormat)
public Guid GetPixelFormat()
HRESULT IWICBitmapSource::GetResolution([Out] double* pDpiX,[Out] double* pDpiY)
public void GetResolution(out double dpiXRef, out double dpiYRef)
dpiXRef
doubledpiYRef
doubleHRESULT IWICBitmapSource::GetSize([Out] unsigned int* puiWidth,[Out] unsigned int* puiHeight)
public void GetSize(out int widthRef, out int heightRef)
widthRef
intheightRef
intPerforms an explicit conversion from System.IntPtr to BitmapSource.
public static explicit operator BitmapSource(IntPtr nativePointer)
nativePointer
System.IntPtr