C# Класс Manina.Windows.Forms.MetadataExtractor

Read metadata. Only EXIF data when using .NET 2.0 methods. Prioritized EXIF/XMP/ICC/etc. data when using WIC/WPF methods.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Artist string
Comment string
Copyright string
DPIX double
DPIY double
DateTaken System.DateTime
EquipmentManufacturer string
EquipmentModel string
Error System.Exception
ExposureTime double
FNumber double
FocalLength double
Height int
ISOSpeed int
ImageDescription string
Rating int
Software string
Width int

Открытые методы

Метод Описание
FromBitmap ( System.Windows.Media.Imaging.BitmapFrame frameWpf ) : MetadataExtractor

Creates an instance of the MetadataExtractor class. Reads metadata via WIC/WPF (.NET 3.0). If WIC lacks a metadata reader for this image type then fall back to .NET 2.0 method.

FromFile ( string path ) : MetadataExtractor

Creates an instance of the MetadataExtractor class. Reads metadata via WIC/WPF (.NET 3.0). If WIC lacks a metadata reader for this image type then fall back to .NET 2.0 method.

FromFile ( string path, bool useWic ) : MetadataExtractor

Creates an instance of the MetadataExtractor class. Reads metadata via WIC/WPF (.NET 3.0). If WIC lacks a metadata reader for this image type then fall back to .NET 2.0 method.

Приватные методы

Метод Описание
ConvertFileTime ( System ft ) : System.DateTime

Convert FileTime to DateTime.

ExifAscii ( byte value ) : string

Converts the given Exif data to an ASCII encoded string.

ExifDateTime ( byte value ) : System.DateTime

Converts the given Exif data to DateTime.

ExifDateTime ( string value ) : System.DateTime

Converts the given Exif data to DateTime. Value must be formatted as yyyy:MM:dd HH:mm:ss.

ExifDouble ( byte value ) : double

Converts the given Exif data to a double number. The value must have 8 bytes.

ExifInt ( byte value ) : int

Converts the given Exif data to an 32-bit signed integer. The value must have 4 bytes.

ExifRational ( byte value ) : string

Converts the given Exif data to a signed rational value represented as a string. The value must have 8 bytes.

ExifUInt ( byte value ) : uint

Converts the given Exif data to an 32-bit unsigned integer. The value must have 4 bytes.

ExifURational ( byte value ) : string

Converts the given Exif data to an unsigned rational value represented as a string. The value must have 8 bytes.

ExifUShort ( byte value ) : ushort

Converts the given Exif data to an 16-bit unsigned integer. The value must have 2 bytes.

GetMetadataObject ( BitmapMetadata metadata ) : object

Returns the metadata for the given query.

InitViaBmp ( Image img ) : void

Read metadata using .NET 2.0 methods.

InitViaBmp ( string path ) : void

Open image and read metadata (.NET 2.0).

InitViaWpf ( System.Windows.Media.Imaging.BitmapFrame frameWpf ) : void

Inits metadata via WIC/WPF (.NET 3.0).

InitViaWpf ( BitmapMetadata data ) : void

Read metadata via WIC/WPF.

InitViaWpf ( string path ) : void

Inits metadata via WIC/WPF (.NET 3.0). If WIC lacks a metadata reader for this image type then fall back to .NET 2.0 method.

MetadataExtractor ( ) : System.Windows.Media.Imaging

Initializes a new instance of the MetadataExtractor class.

Описание методов

FromBitmap() публичный статический Метод

Creates an instance of the MetadataExtractor class. Reads metadata via WIC/WPF (.NET 3.0). If WIC lacks a metadata reader for this image type then fall back to .NET 2.0 method.
public static FromBitmap ( System.Windows.Media.Imaging.BitmapFrame frameWpf ) : MetadataExtractor
frameWpf System.Windows.Media.Imaging.BitmapFrame Opened WPF image
Результат MetadataExtractor

FromFile() публичный статический Метод

Creates an instance of the MetadataExtractor class. Reads metadata via WIC/WPF (.NET 3.0). If WIC lacks a metadata reader for this image type then fall back to .NET 2.0 method.
public static FromFile ( string path ) : MetadataExtractor
path string Filepath of image
Результат MetadataExtractor

FromFile() публичный статический Метод

Creates an instance of the MetadataExtractor class. Reads metadata via WIC/WPF (.NET 3.0). If WIC lacks a metadata reader for this image type then fall back to .NET 2.0 method.
public static FromFile ( string path, bool useWic ) : MetadataExtractor
path string Filepath of image
useWic bool true to use Windows Imaging Component; otherwise false.
Результат MetadataExtractor

Описание свойств

Artist публичное свойство

Image creator (null = not available).
public string Artist
Результат string

Comment публичное свойство

User comment (null = not available).
public string Comment
Результат string

Copyright публичное свойство

Copyright information (null = not available).
public string Copyright
Результат string

DPIX публичное свойство

Horizontal DPI.
public double DPIX
Результат double

DPIY публичное свойство

Vertical DPI.
public double DPIY
Результат double

DateTaken публичное свойство

Date taken.
public DateTime,System DateTaken
Результат System.DateTime

EquipmentManufacturer публичное свойство

Camera manufacturer (null = not available).
public string EquipmentManufacturer
Результат string

EquipmentModel публичное свойство

Camera model (null = not available).
public string EquipmentModel
Результат string

Error публичное свойство

Error.
public Exception,System Error
Результат System.Exception

ExposureTime публичное свойство

Exposure time.
public double ExposureTime
Результат double

FNumber публичное свойство

F number.
public double FNumber
Результат double

FocalLength публичное свойство

Focal length.
public double FocalLength
Результат double

Height публичное свойство

Image height.
public int Height
Результат int

ISOSpeed публичное свойство

Iso speed rating.
public int ISOSpeed
Результат int

ImageDescription публичное свойство

Image description (null = not available).
public string ImageDescription
Результат string

Rating публичное свойство

Rating value between 0-99.
public int Rating
Результат int

Software публичное свойство

Software used (null = not available).
public string Software
Результат string

Width публичное свойство

Image width.
public int Width
Результат int