DngProperties Class

The identifying tags of a DNG file: its version, and the camera and profile that describe its raw data. This is informational only, like ImageMetadata.SourceFormat: it describes the file, not the pixels.

public sealed class DngProperties : IEquatable<DngProperties>

Remarks

No operation updates it, and every encoder ignores it.

Implements

Constructors

NameDescription
DngProperties(Version, Version, string?, string?, string?, string?, string?, string?, double)Initializes a new instance of the DngProperties class.

DngProperties(Version, Version, string?, string?, string?, string?, string?, string?, double)

DngProperties.cs

Initializes a new instance of the DngProperties class.

public DngProperties(Version version, Version backwardVersion, string? uniqueCameraModel, string? localizedCameraModel, string? make, string? model, string? cameraSerialNumber, string? profileName, double baselineExposure)

Parameters

version Version
The version of the DNG specification the file follows (DNGVersion).
backwardVersion Version
The oldest version of a reader that can read the file (DNGBackwardVersion).
uniqueCameraModel string?
The unique, non-localized name of the camera model (UniqueCameraModel), or null.
localizedCameraModel string?
The localized name of the camera model (LocalizedCameraModel), or null.
make string?
The manufacturer of the camera (Make), or null.
model string?
The model of the camera (Model), or null.
cameraSerialNumber string?
The serial number of the camera (CameraSerialNumber), or null.
profileName string?
The name of the camera profile of the file (ProfileName), or null.
baselineExposure double
The exposure, in stops, that the rendering adds to give the camera model the same brightness as other models (BaselineExposure).

Exceptions

ArgumentNullException
version or backwardVersion is null.

Properties

NameDescription
BackwardVersionGets the oldest version of a reader that can read the file (DNGBackwardVersion).
BaselineExposureGets the exposure, in stops, that the rendering adds to give the camera model the same brightness as other models (BaselineExposure, 0 by default). The decoded pixels include it.
CameraSerialNumberGets the serial number of the camera (CameraSerialNumber), or null.
LocalizedCameraModelGets the localized name of the camera model (LocalizedCameraModel), or null.
MakeGets the manufacturer of the camera (Make), or null.
ModelGets the model of the camera (Model), or null.
ProfileNameGets the name of the camera profile of the file (ProfileName), or null.
UniqueCameraModelGets the unique, non-localized name of the camera model (UniqueCameraModel), or null.
VersionGets the version of the DNG specification the file follows (DNGVersion), such as 1.4.0.0.

BackwardVersion

DngProperties.cs

Gets the oldest version of a reader that can read the file (DNGBackwardVersion).

public Version BackwardVersion { get; }

Property value

Version

BaselineExposure

DngProperties.cs

Gets the exposure, in stops, that the rendering adds to give the camera model the same brightness as other models (BaselineExposure, 0 by default). The decoded pixels include it.

public double BaselineExposure { get; }

Property value

double

CameraSerialNumber

DngProperties.cs

Gets the serial number of the camera (CameraSerialNumber), or null.

public string? CameraSerialNumber { get; }

Property value

string?

LocalizedCameraModel

DngProperties.cs

Gets the localized name of the camera model (LocalizedCameraModel), or null.

public string? LocalizedCameraModel { get; }

Property value

string?

Gets the manufacturer of the camera (Make), or null.

public string? Make { get; }

Property value

string?

Gets the model of the camera (Model), or null.

public string? Model { get; }

Property value

string?

ProfileName

DngProperties.cs

Gets the name of the camera profile of the file (ProfileName), or null.

public string? ProfileName { get; }

Property value

string?

UniqueCameraModel

DngProperties.cs

Gets the unique, non-localized name of the camera model (UniqueCameraModel), or null.

public string? UniqueCameraModel { get; }

Property value

string?

Gets the version of the DNG specification the file follows (DNGVersion), such as 1.4.0.0.

public Version Version { get; }

Property value

Version

Methods

NameDescription
Equals(DngProperties?)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Determines whether the specified object is equal to the current object.
GetHashCode()Serves as the default hash function.
ToString()Returns a string that represents the current object.

Equals overloads

Equals(DngProperties?)

DngProperties.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(DngProperties? other)
Parameters
other DngProperties?
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

DngProperties.cs

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current object.
Returns

bool true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

DngProperties.cs

Serves as the default hash function.

public override int GetHashCode()

Returns

int A hash code for the current object.

Returns a string that represents the current object.

public override string ToString()

Returns

string A string that represents the current object.