Class MpfImage
One image of a Multi-Picture Format file: its MP entry, with the offset resolved to the start of the file.
public sealed record MpfImage : IEquatable<MpfImage>
- Inheritance
-
MpfImage
- Implements
- Inherited Members
Examples
// A JPEG's Multi-Picture index lists the images stored after the primary: previews, stereo views, a gain map.
using Raster photo = Raster.Load("ultrahdr.jpg");
MpfData? index = ((JpegDetails)photo.Metadata.FormatDetails!).MultiPicture;
foreach (MpfImage image in index?.Images ?? [])
{
Console.WriteLine($"{image.Type}: {image.Length:N0} bytes at {image.Offset:N0}");
}
// LoadAll gives every JPEG image the index lists, the primary first; a plain JPEG gives one.
using RasterList all = Raster.LoadAll("ultrahdr.jpg");
Properties
DataFormat
Gets the image data format from the entry: 0 for JPEG, the only one the standard defines.
public int DataFormat { get; init; }
Property Value
DependentImage1
Gets the entry number (from 1) of the first dependent image, or 0 for none.
public int DependentImage1 { get; init; }
Property Value
DependentImage2
Gets the entry number (from 1) of the second dependent image, or 0 for none.
public int DependentImage2 { get; init; }
Property Value
IsDependentChild
Gets whether the image depends on a parent image.
public bool IsDependentChild { get; init; }
Property Value
IsDependentParent
Gets whether the image is the parent of dependent images.
public bool IsDependentParent { get; init; }
Property Value
IsRepresentative
Gets whether the image represents the set, such as the image a viewer shows first.
public bool IsRepresentative { get; init; }
Property Value
Length
Gets the image's length in bytes.
public long Length { get; init; }
Property Value
Offset
Gets where the image's SOI marker is, in bytes from the start of the file's own SOI.
public long Offset { get; init; }
Property Value
Type
Gets the image's type. Values Egami does not name are kept as they are.
public MpfImageType Type { get; init; }