FileType

ImageRootPackage.FileType property

Gets the file type metadata package.

public ImageTypePackage FileType { get; }

Property Value

The file type metadata package.

Examples

This code sample demonstrates how to extract common image properties such as width and height, MIME type, byte order, etc.

using (Metadata metadata = new Metadata(Constants.InputPng))
{
    var root = metadata.GetRootPackage<ImageRootPackage>();

    Console.WriteLine(root.FileType.FileFormat);
    Console.WriteLine(root.FileType.ByteOrder);
    Console.WriteLine(root.FileType.MimeType);
    Console.WriteLine(root.FileType.Extension);
    Console.WriteLine(root.FileType.Width);
    Console.WriteLine(root.FileType.Height);
}

See Also