Table of Contents

Class RawPreview

Namespace
Egami.Formats.Extended.Raw
Assembly
Egami.Formats.Extended.dll

An embedded preview a RAW file carries.

public sealed record RawPreview : IEquatable<RawPreview>
Inheritance
RawPreview
Implements
Inherited Members

Examples

using Raster photo = Raster.Load("photo.dng", context);
RawDetails details = (RawDetails)photo.Metadata.FormatDetails!;
Console.WriteLine($"{details.Make} {details.Model}, DNG {details.DngVersion}");
Console.WriteLine($"Sensor {details.SensorWidth}×{details.SensorHeight}, crop {details.CropArea}");
Console.WriteLine($"White balance {details.Temperature:F0} K, tint {details.Tint:F0}, multipliers {string.Join(", ", details.WhiteBalance)}");
foreach (RawPreview preview in details.Previews)
{
    Console.WriteLine($"Preview {preview.Width}×{preview.Height} {preview.Kind}");
}

Constructors

RawPreview(int, int, RawPreviewKind)

An embedded preview a RAW file carries.

public RawPreview(int Width, int Height, RawPreviewKind Kind)

Parameters

Width int

The preview's width in pixels.

Height int

The preview's height in pixels.

Kind RawPreviewKind

How the preview is stored.

Examples

using Raster photo = Raster.Load("photo.dng", context);
RawDetails details = (RawDetails)photo.Metadata.FormatDetails!;
Console.WriteLine($"{details.Make} {details.Model}, DNG {details.DngVersion}");
Console.WriteLine($"Sensor {details.SensorWidth}×{details.SensorHeight}, crop {details.CropArea}");
Console.WriteLine($"White balance {details.Temperature:F0} K, tint {details.Tint:F0}, multipliers {string.Join(", ", details.WhiteBalance)}");
foreach (RawPreview preview in details.Previews)
{
    Console.WriteLine($"Preview {preview.Width}×{preview.Height} {preview.Kind}");
}

Properties

Height

The preview's height in pixels.

public int Height { get; init; }

Property Value

int

Kind

How the preview is stored.

public RawPreviewKind Kind { get; init; }

Property Value

RawPreviewKind

Width

The preview's width in pixels.

public int Width { get; init; }

Property Value

int