C# Class 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.
Datei anzeigen Open project: oozcitak/imagelistview Class Usage Examples

Public Properties

Property Type Description
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

Public Methods

Method Description
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.

Private Methods

Method Description
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.

Method Details

FromBitmap() public static method

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
return MetadataExtractor

FromFile() public static method

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
return MetadataExtractor

FromFile() public static method

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.
return MetadataExtractor

Property Details

Artist public_oe property

Image creator (null = not available).
public string Artist
return string

Comment public_oe property

User comment (null = not available).
public string Comment
return string

Copyright public_oe property

Copyright information (null = not available).
public string Copyright
return string

DPIX public_oe property

Horizontal DPI.
public double DPIX
return double

DPIY public_oe property

Vertical DPI.
public double DPIY
return double

DateTaken public_oe property

Date taken.
public DateTime,System DateTaken
return System.DateTime

EquipmentManufacturer public_oe property

Camera manufacturer (null = not available).
public string EquipmentManufacturer
return string

EquipmentModel public_oe property

Camera model (null = not available).
public string EquipmentModel
return string

Error public_oe property

Error.
public Exception,System Error
return System.Exception

ExposureTime public_oe property

Exposure time.
public double ExposureTime
return double

FNumber public_oe property

F number.
public double FNumber
return double

FocalLength public_oe property

Focal length.
public double FocalLength
return double

Height public_oe property

Image height.
public int Height
return int

ISOSpeed public_oe property

Iso speed rating.
public int ISOSpeed
return int

ImageDescription public_oe property

Image description (null = not available).
public string ImageDescription
return string

Rating public_oe property

Rating value between 0-99.
public int Rating
return int

Software public_oe property

Software used (null = not available).
public string Software
return string

Width public_oe property

Image width.
public int Width
return int