Exemplo n.º 1
0
 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);
Exemplo n.º 2
0
        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));
        }