CompressedImage.CreateFromFile Method (String)

Creates a CompressedImage directly from a file, keeping a PNG or JPEG source's encoded bytes as is instead of decoding and recompressing them.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public static CompressedImage CreateFromFile(
	string fileName
)

Parameters

fileName

Type: System.String

The path to the source image file.

Return Value

A new CompressedImage instance. Its ColorStream reports Png or Jpeg to match the source; any other format falls back to decoding and re-compressing with Zip.

See Also

Reference