Table of Contents

Class JpegTransformResult

Namespace
Egami.Formats.Jpeg
Assembly
Egami.dll

What a lossless JPEG transform produced: the size of the result and what was repaired or left out on the way.

public sealed class JpegTransformResult
Inheritance
JpegTransformResult
Inherited Members

Examples

// Turns the photo upright by its EXIF orientation without re-encoding: no quality is lost, and the tag is reset.
JpegTransform.Apply("sideways.jpg", "upright.jpg", new JpegTransformOptions { Operation = JpegTransformOperation.AutoOrient });

// Rotates, crops and drops the color in one pass; a file can be transformed in place.
JpegTransformResult result = JpegTransform.Apply("upright.jpg", "upright.jpg", new JpegTransformOptions
{
    Operation = JpegTransformOperation.Rotate90,
    Crop = new Rect(0, 0, 200, 120),
    Grayscale = true,
});
Console.WriteLine($"{result.Width} × {result.Height}");

Properties

Height

Gets the height of the result, in pixels.

public int Height { get; }

Property Value

int

Warnings

Gets the warnings: damage in the source that was recovered from, as a load would list in Warnings, and metadata that could not be carried over.

public IReadOnlyList<EgamiDiagnostic> Warnings { get; }

Property Value

IReadOnlyList<EgamiDiagnostic>

Width

Gets the width of the result, in pixels.

public int Width { get; }

Property Value

int