Table of Contents

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

factory IFileTypeDocumentFactory1
width int
height int
pixelFormat PixelFormat

Returns

IFileTypeDocument

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

factory IFileTypeDocumentFactory1
size SizeInt32

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

factory IFileTypeDocumentFactory1
width int
height int

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.