CompressedImage.CreateFromFile Method (String)

Applies to: Graphics Mill 12.1, 6.x-12.x (may differ)

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