public static IBitmap <TPixel> CreateBitmap <TPixel>(this IImagingFactory factory, SizeInt32 size, BitmapCreateCacheOption option = 2) where TPixel : struct, INaturalPixelInfo => factory.CreateBitmap <TPixel>(size.width, size.height, option);
public static IBitmap <TPixel> CreateBitmap <TPixel>(this IImagingFactory factory, int width, int height, BitmapCreateCacheOption option = 2) where TPixel : struct, INaturalPixelInfo { TPixel local = default(TPixel); return((IBitmap <TPixel>)factory.CreateBitmap(width, height, local.PixelFormat, option)); }