Table of Contents

Method CreateBitmapSourceFromImage

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.Framework.dll

CreateBitmapSourceFromImage<TPixel>(IDirect2DFactory, SizeInt32, Func<IDeviceContext, IDeviceImage>)

public static IBitmapSource<TPixel> CreateBitmapSourceFromImage<TPixel>(this IDirect2DFactory factory, SizeInt32 pixelSize, Func<IDeviceContext, IDeviceImage> createImageCallback) where TPixel : unmanaged, INaturalPixelInfo

Parameters

factory IDirect2DFactory
pixelSize SizeInt32
createImageCallback Func<IDeviceContext, IDeviceImage>

Returns

IBitmapSource<TPixel>

Type Parameters

TPixel

CreateBitmapSourceFromImage<TPixel>(IDirect2DFactory, SizeInt32, DevicePixelFormat, Func<IDeviceContext, IDeviceImage>)

public static IBitmapSource<TPixel> CreateBitmapSourceFromImage<TPixel>(this IDirect2DFactory factory, SizeInt32 pixelSize, DevicePixelFormat bufferPixelFormat, Func<IDeviceContext, IDeviceImage> createImageCallback) where TPixel : unmanaged, INaturalPixelInfo

Parameters

factory IDirect2DFactory
pixelSize SizeInt32
bufferPixelFormat DevicePixelFormat
createImageCallback Func<IDeviceContext, IDeviceImage>

Returns

IBitmapSource<TPixel>

Type Parameters

TPixel