Method CreateDocument
- Namespace
- PaintDotNet.FileTypes
- Assembly
- PaintDotNet.FileTypes.dll
CreateDocument(IFileTypeDocumentFactory1, int, int, in PixelFormat)
Creates a document of the given size and pixel format.
public static IFileTypeDocument CreateDocument(this IFileTypeDocumentFactory1 factory, int width, int height, in PixelFormat pixelFormat)
Parameters
factoryIFileTypeDocumentFactory1widthintheightintpixelFormatPixelFormat
Returns
Remarks
In general, you should use the pixel format that is most natural for loading the image data, without worrying about whether it is a "native" pixel format (as per NativePixelFormats. This allows Paint.NET to handle the conversion in the most efficient mannaer and with the highest possible quality.
CreateDocument<TPixel>(IFileTypeDocumentFactory1, SizeInt32)
Creates a document of the given size and pixel format.
public static IFileTypeDocument<TPixel> CreateDocument<TPixel>(this IFileTypeDocumentFactory1 factory, SizeInt32 size) where TPixel : unmanaged, INaturalPixelInfo
Parameters
factoryIFileTypeDocumentFactory1sizeSizeInt32
Returns
- IFileTypeDocument<TPixel>
Type Parameters
TPixel
Remarks
In general, you should use the pixel format that is most natural for loading the image data, without worrying about whether it is a "native" pixel format (as per NativePixelFormats. This allows Paint.NET to handle the conversion in the most efficient mannaer and with the highest possible quality.
CreateDocument<TPixel>(IFileTypeDocumentFactory1, int, int)
Creates a document of the given size and pixel format.
public static IFileTypeDocument<TPixel> CreateDocument<TPixel>(this IFileTypeDocumentFactory1 factory, int width, int height) where TPixel : unmanaged, INaturalPixelInfo
Parameters
factoryIFileTypeDocumentFactory1widthintheightint
Returns
- IFileTypeDocument<TPixel>
Type Parameters
TPixel
Remarks
In general, you should use the pixel format that is most natural for loading the image data, without worrying about whether it is a "native" pixel format (as per NativePixelFormats. This allows Paint.NET to handle the conversion in the most efficient mannaer and with the highest possible quality.