CoenM.ImageSharp.ImageHash 1.2.30

There is a newer version of this package available.
See the version list below for details.
dotnet add package CoenM.ImageSharp.ImageHash --version 1.2.30                
NuGet\Install-Package CoenM.ImageSharp.ImageHash -Version 1.2.30                
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.2.30" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoenM.ImageSharp.ImageHash --version 1.2.30                
#r "nuget: CoenM.ImageSharp.ImageHash, 1.2.30"                
#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.2.30

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

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 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.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 (2)

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

Package Downloads
Verify.ImageHash

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

Aiursoft.NiBot.Core

Nuget package of 'Core' provided by Aiursoft

GitHub repositories (2)

Showing the top 2 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.
Decimation/SmartImage
Reverse image search tool (SauceNao, IQDB, Ascii2D, trace.moe, and more)
Version Downloads Last updated
1.3.6 148,274 7/5/2022
1.2.30 15,204 2/12/2022
1.1.5 7,188 11/13/2021
1.0.0 71,259 9/5/2020
1.0.0-beta0004 2,739 9/24/2019
1.0.0-beta0003 1,768 6/26/2019
1.0.0-beta0002 2,607 2/1/2019
1.0.0-beta.5 276 8/31/2020