示例#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);
示例#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));
        }