Loading...
z

ImageWriter Module Pixelnetica™ Document Scanning SDK for .NET MAUI

The ImageWriter module provides functionality for saving processed images or scanned pages into various output formats, such as JPEG, PNG, PDF, or TIFF.

Creation

We recommend using using statements to ensure writer instances are automatically disposed of after use.

using (ImageWriter writer = new ImageWriter(ImageWriter.EImageFileType.Pdf))
{
    ...
}

The module supports the following writer types:

Writer TypeDescription
ImageSdkLibrary.ImageWriterJpegWrites color JPEG images.
ImageSdkLibrary.ImageWriterPngWrites color PNG images.
ImageSdkLibrary.ImageWriterWebMWrites WebM images.
ImageSdkLibrary.ImageWriterPngExtWrites 1-bit black-and-white PNG images.
ImageSdkLibrary.ImageWriterPdfWrites PDF documents.
ImageSdkLibrary.ImageWriterTiffWrites 1-bit black-and-white TIFF-G4 compressed images (most compact black-and-white format).

Writing Images

To write one or multiple images (or document pages), specify the output file path:

writer.Open(filePath);

You can also configure additional optional parameters specific to the writer type (e.g., JPEG compression quality or PDF page size):

writer.Configure(key, value);

To write a single image or page:

writer.Write(image);

For multipage documents, call Write() multiple times for each page.

Further Reference

For more details, please refer to the .NET MAUI demo application source code on GitHub.

Top