HotRS.ImageComparison 1.0.9

dotnet add package HotRS.ImageComparison --version 1.0.9
NuGet\Install-Package HotRS.ImageComparison -Version 1.0.9
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="HotRS.ImageComparison" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HotRS.ImageComparison --version 1.0.9
#r "nuget: HotRS.ImageComparison, 1.0.9"
#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 HotRS.ImageComparison as a Cake Addin
#addin nuget:?package=HotRS.ImageComparison&version=1.0.9

// Install HotRS.ImageComparison as a Cake Tool
#tool nuget:?package=HotRS.ImageComparison&version=1.0.9

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.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.9 140 1/25/2024
1.0.8 80 1/22/2024
1.0.7 97 1/15/2024
1.0.6 96 1/12/2024
1.0.5 127 1/2/2024
1.0.4 110 12/22/2023
1.0.3 94 12/22/2023
1.0.2 119 12/19/2023
1.0.1 118 12/16/2023
1.0.0 97 12/15/2023