Skip to content

Repository files navigation

LicenseNuget

This is an updated fork of ExifLibrary, a .Net Standard and .NET library for editing Exif metadata contained in image files.
It mainly removes the dependency on netstandard1.3 to avoid pulling in loads of dependencies and has merged a PR for better DateTime parsing.

Installation

If you are using NuGet you can install it with:

PM> Install-Package ExifLibNet.Updated

Quick Start

To read an image file and extract metadata:

varfile=ImageFile.FromFile("path_to_image");// the type of the ISO speed rating tag value is unsigned short// see documentation for tag data typesvarisoTag=file.Properties.Get<ExifUShort>(ExifTag.ISOSpeedRatings);// the flash tag's value is an enumvarflashTag=file.Properties.Get<ExifEnumProperty<Flash>>(ExifTag.Flash);// GPS latitude is a custom type with three rational values// representing degrees/minutes/seconds of the latitude varlatTag=file.Properties.Get<GPSLatitudeLongitude>(ExifTag.GPSLatitude);

To add metadata:

varfile=ImageFile.FromFile("path_to_image");// note the explicit cast to ushortfile.Properties.Set(ExifTag.ISOSpeedRatings,<ushort>200);//for pngsvarpngText=newPngText(ExifTag.PNGTagName, ...)file.Properties.Set(pngText)

To save the image with metadata:

file.Save("path_to_image");

Documentation

Please visit: http://oozcitak.github.io/exiflibrary/

About

An update of the .Net library for editing Exif metadata

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages