SharpExifTool 13.63.0.3
dotnet add package SharpExifTool --version 13.63.0.3
NuGet\Install-Package SharpExifTool -Version 13.63.0.3
<PackageReference Include="SharpExifTool" Version="13.63.0.3" />
<PackageVersion Include="SharpExifTool" Version="13.63.0.3" />
<PackageReference Include="SharpExifTool" />
paket add SharpExifTool --version 13.63.0.3
#r "nuget: SharpExifTool, 13.63.0.3"
#:package SharpExifTool@13.63.0.3
#addin nuget:?package=SharpExifTool&version=13.63.0.3
#tool nuget:?package=SharpExifTool&version=13.63.0.3
![]()
SharpExifTool
C# Wrapper for ExifTool by Phil Harvey. Available for Windows, macOS, and Linux.
Overview
SharpExifTool is a .NET library that wraps the popular exiftool command-line application, making it easier for .NET developers to work with image metadata.
This package ships with the exiftool binary, so you don't need to install exiftool separately.
Installation
To install this library in your .NET project, get SharpExifTool from NuGet. You can use the Visual Studio Package Manager UI or the command line below:
dotnet add package SharpExifTool
Usage and Examples
In this section, you'll learn how to use the library properly. I've made the functions as simple as possible. Hopefully, they can be easily understood by looking at the code examples.
Init
To use SharpExifTool, the first thing you need to do is initialize the library.
You can create an ExifTool instance using the built-in exiftool binary that is shipped with the SharpExifTool package.
using(var exiftool = new SharpExifTool.ExifTool())
{
// Write your code here
}
The ExifTool class implements the IDisposable interface.
Make sure you call Dispose() after you're finished using it, or wrap it in a using statement.
Read All EXIF / Metadata Tags
You can get all metadata from an image by calling the ExtractAllMetadataAsync function.
It returns a collection of KeyValuePair<string, string>.
Here's an example of how to use this function:
using(var exiftool = new SharpExifTool.ExifTool())
{
var metadataList = await exiftool.ExtractAllMetadataAsync(filename: "image.jpg");
}
Write EXIF / Metadata Tags
You can write metadata using the WriteTagsAsync function.
In this example, the artist metadata is set to Phil Harvey in image.jpg without overwriting the original file.
using(var exiftool = new SharpExifTool.ExifTool())
{
await exiftool.WriteTagsAsync(
filename: "image.jpg",
properties: new Dictionary<string, string>
{
["artist"] = "Phil Harvey",
},
overwriteOriginal: false);
}
Remove All Safe EXIF / Metadata Tags
Let's say you want to strip metadata from a user-uploaded image to reduce the amount of Personally Identifiable Information (PII) stored in its metadata.
You can call the RemoveAllMetadataAsync function.
This removes all metadata that can be safely removed from an image.
using(var exiftool = new SharpExifTool.ExifTool())
{
await exiftool.RemoveAllMetadataAsync(filename: "image.jpg");
}
Custom Command
You can also execute custom commands using this library.
For example, if you already have predefined exiftool CLI parameters like this:
exiftool -artist="Phil Harvey" -copyright="2011 Phil Harvey" a.jpg
You can implement the same command in C# like this:
using(var exiftool = new SharpExifTool.ExifTool())
{
await exiftool.ExecuteAsync(
"-artist=\"Phil Harvey\"",
"-copyright=\"2011 Phil Harvey\"",
"a.jpg");
}
Development
Before starting development, install the third-party dependencies by running getlibs.sh (it currently works only on macOS and Unix-like operating systems; there is no Windows script yet).
$ ./getlibs.sh
This downloads and extracts the files defined in .gitbinmodules into the runtimes/{rid}/native directories.
To use a different version of exiftool, edit the .gitbinmodules file and change it to your desired version.
Alternatively, you can download it from the official website and extract the files manually. Place them in the runtimes directory so the structure looks like this:
.
├── docs
│ └── README.md
├── runtimes
│ ├── unix
│ │ └── native
│ │ ├── Makefile.PL
│ │ ├── arg_files
│ │ ├── build_geolocation
│ │ ├── config_files
│ │ ├── exiftool
│ │ ├── fmt_files
│ │ ├── lib
│ │ ├── perl-Image-ExifTool.spec
│ │ └── t
│ ├── win-x64
│ │ └── native
│ │ └── exiftool.exe
│ └── win-x86
│ └── native
│ └── exiftool.exe
└── src
Credits
- ExifTool by Phil Harvey.
- FileMeta/ExifToolWrapper: CodeBit C# wrapper for Phil Harvey's ExifTool.
License
- This SharpExifTool project is licensed under the MIT License.
- ExifTool is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Made with ☕ by Junian.dev.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
SharpExifTool Release Notes
13.63.0.3 - 2026-11-13
* Added: Sample projects for .NET MAUI (Windows and macOS), WinForms, Avalonia, ASP.NET Core Razor Pages, and a console app that demonstrate selecting an image and displaying its metadata.
* Added: Bundled 64-bit Windows ExifTool executable alongside the 32-bit one.
* Changed: Updated the bundled ExifTool to 13.63.
* Changed: Bundled ExifTool files now ship under runtimes/{win-x86,win-x64,unix}/native instead of contentFiles, and the executable is resolved from runtimes/{rid}/native with a fallback to the flattened output directory.
* Changed: getlibs.sh downloads the 32-bit Windows, 64-bit Windows, and Unix archives separately.
13.32.0.1 - 2025-07-06
* Added: Optional ExifTool arguments for ExtractAllMetadata and ExtractAllMetadataAsync, enabling flags such as -u to extract unknown tags.
* Fixed: The exiftoolPath constructor argument is now used instead of being ignored; a FileNotFoundException is thrown when the path does not exist.
* Changed: Updated the bundled ExifTool to 13.32.
* Changed: Unit tests now target .NET 9.
12.87.0.1 - 2024-09-28
* Added: Unit test project with ExifTool sample images covering metadata reading and writing.
* Changed: Updated the bundled ExifTool to 12.87.
12.86.0.2 - 2024-06-08
* Fixed: Restored the contentFiles package layout so the bundled ExifTool files are copied to the output directory of consuming projects.
12.86.0.1 - 2024-06-08
* Changed: Moved the bundled ExifTool files to build/netstandard2.0.
12.86.0 - 2024-06-08
* Added: Optional exiftoolPath constructor argument for using a custom ExifTool executable.
* Added: overwriteOriginal option for WriteTags, WriteTagsAsync, RemoveAllMetadata, and RemoveAllMetadataAsync.
* Changed: Renamed the namespace to SharpExifTool (breaking change).
* Changed: Updated the bundled ExifTool to 12.86.
* Changed: Moved the bundled ExifTool files to lib/netstandard2.0.
12.84.0.5 - 2024-05-11
* Changed: Finalized the netstandard2.0-only package with contentFiles and copy-to-output metadata for the bundled ExifTool files.
12.84.0.4 - 2024-05-11
* Changed: Limited the package to netstandard2.0; removed the net45, net6.0, and net8.0 targets.
* Changed: Moved the bundled ExifTool files under lib/netstandard2.0.
12.84.0.3 - 2024-05-11
* Changed: Moved the bundled ExifTool files from contentFiles to lib.
12.84.0.2 - 2024-05-11
* Changed: Moved the bundled ExifTool files from the legacy content folder to contentFiles/any/any.
12.84.0.1 - 2024-05-11
* Added: Initial release with ExtractAllMetadata, WriteTags, RemoveAllMetadata, raw Execute overloads, and TryParseDate.
* Added: Targets for .NET Framework 4.5, .NET 6, .NET 8, and .NET Standard 2.0.
* Added: Bundled ExifTool 12.84 binaries for Windows and Unix.