HotRS.ImageComparison
1.0.7
See the version list below for details.
dotnet add package HotRS.ImageComparison --version 1.0.7
NuGet\Install-Package HotRS.ImageComparison -Version 1.0.7
<PackageReference Include="HotRS.ImageComparison" Version="1.0.7" />
paket add HotRS.ImageComparison --version 1.0.7
#r "nuget: HotRS.ImageComparison, 1.0.7"
// Install HotRS.ImageComparison as a Cake Addin #addin nuget:?package=HotRS.ImageComparison&version=1.0.7 // Install HotRS.ImageComparison as a Cake Tool #tool nuget:?package=HotRS.ImageComparison&version=1.0.7
House on the Rock - Image Comparison Utility
This nuget package is primarily an encapsulation of work done here: https://github.com/xnafan/Simple-image-comparison/blob/master/SimpleImageComparisonClassLibrary/SimpleImageComparisonClassLibrary.csproj
I added a few public methods to simplify usage.
Nuget Link
https://www.nuget.org/packages/HotRS.ImageComparison/
Installation:
Install using Package Manager (or your preferred tool) PM > NuGet\Install-Package HotRS.ImageComparison
Usage
Generate image metadata:
(These are the constructors)
ImageInfo info = new ImageInfo(filename, gridSize);
ImageInfo info = new ImageInfo(Image, gridSize);
Note on the GridSize parameter:
The generation of the HashCode is dependent upon the "GrayValues" calculated in the constructor. The application samples a NxN grid of pixel values (default is 16x16). For file sets of 10k or less, this is probably acceptable. For larger sets of file, you may run into duplicate hashcodes for pictures that are NOT identical. Increasing the grid size will resolve this issue. The downside of a larger gird size is processing time. On a test machine with 32GB ram and a 4ghz quadcore processor, the average processing time at 16 was about 100 ms/file. With a setting of 32 it jumped to 348ms.
ImageInfo includes:
public byte[,] GrayValues
public override string ToString()
public bool Equals(ImageInfo other)
Does this image equal another.
public override int GetHashCode()
GetHashCode() generates a code unique to the image. These codes can later be matched when looking for duplicates or compared for differences within a percentage (finds similar images).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net6.0
- AutoMapper (>= 10.1.1)
- System.Drawing.Common (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.