Table of Contents

Method SaveAsPngBytes

Namespace
LMKit.Media.Image
Assembly
LM-Kit.NET.dll

SaveAsPngBytes(int)

Saves the image as PNG to a byte array without writing to disk.

public byte[] SaveAsPngBytes(int compressionLevel = 6)

Parameters

compressionLevel int

Zlib compression level (0 to 9). Default is 6.

Returns

byte[]

A byte array containing the PNG-encoded image data.

Exceptions

ObjectDisposedException

Thrown if this instance has been disposed.

InvalidOperationException

Thrown if encoding fails.

Share