Table of Contents

Method CreateDocument

Namespace
PaintDotNet.FileTypes
Assembly
PaintDotNet.FileTypes.dll

CreateDocument(SizeInt32, in PixelFormat)

Creates a document of the given size and pixel format.

IFileTypeDocument CreateDocument(SizeInt32 size, in PixelFormat pixelFormat)

Parameters

size SizeInt32
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.