CoenM.ImageSharp.ImageHash 1.3.6

dotnet add package CoenM.ImageSharp.ImageHash --version 1.3.6
NuGet\Install-Package CoenM.ImageSharp.ImageHash -Version 1.3.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoenM.ImageSharp.ImageHash" Version="1.3.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoenM.ImageSharp.ImageHash --version 1.3.6
#r "nuget: CoenM.ImageSharp.ImageHash, 1.3.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CoenM.ImageSharp.ImageHash as a Cake Addin
#addin nuget:?package=CoenM.ImageSharp.ImageHash&version=1.3.6

// Install CoenM.ImageSharp.ImageHash as a Cake Tool
#tool nuget:?package=CoenM.ImageSharp.ImageHash&version=1.3.6

ImageHash

Perceptual image hashing using the ImageSharp library. Includes three hashing algorithms (AverageHash, DifferenceHash, and PerceptualHash). See github for more information.

Calculate image hash

var hashAlgorithm = new AverageHash();
// or one of the other available algorithms:
// var hashAlgorithm = new DifferenceHash();
// var hashAlgorithm = new PerceptualHash();

string filename = "your filename";
using var stream = File.OpenRead(filename);

ulong imageHash = hashAlgorithm.Hash(stream);

Calculate image similarity

Note that to calculate the image similarity, both image hashes should have been calculated using the same hash algorihm.

// calculate the two image hashes
ulong hash1 = hashAlgorithm.Hash(imageStream1);
ulong hash2 = hashAlgorithm.Hash(imageStream2);

double percentageImageSimilarity = CompareHash.Similarity(hash1, hash2);
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CoenM.ImageSharp.ImageHash:

Package Downloads
Verify.ImageHash The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Extends Verify (https://github.com/VerifyTests/Verify) to allow verification via ImageHash (https://github.com/coenm/ImageHash).

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on CoenM.ImageSharp.ImageHash:

Repository Stars
Webreaper/Damselfly
Damselfly is a server-based Photograph Management app. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names. Damselfly includes support for object/face detection.
Version Downloads Last updated
1.3.6 98,458 7/5/2022
1.2.30 13,153 2/12/2022
1.1.5 5,608 11/13/2021
1.0.0 55,210 9/5/2020
1.0.0-beta0004 2,695 9/24/2019
1.0.0-beta0003 1,741 6/26/2019
1.0.0-beta0002 2,576 2/1/2019
1.0.0-beta.5 261 8/31/2020