Skip to content

Commit 6c89eca

Browse files
author
Kabuto_W
committed
closes #4; Support subFolders.
1 parent d237968 commit 6c89eca

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ Reduce duplication in image folders.
1515
## Usage
1616
1. Get `SimilarImages.exe` in the following ways.
1717
- Build this project in Visual Studio.
18-
- Find it in [_Output](_Output).
19-
- Find it in [Releases](https://github.com/Roy0309/ImageSimilarityDetection-UI/releases).
18+
- Or find it in [Releases](https://github.com/Roy0309/ImageSimilarityDetection-UI/releases).
2019

2120
2. Double click `SimilarImages.exe`. Select an image folder and set arguments (the default is suggested arguments). Enjoy!
2221

SimilarImages/SimilarImages/ImageHash.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ private static KeyValuePair<string, string>[] GetImageHashes(string folderPath,
9898
{
9999
// Get images
100100
DirectoryInfo di = new DirectoryInfo(folderPath);
101-
var imageNames = from file in di.GetFiles()
102-
where imageExtensions.Contains(file.Extension)
103-
select file.FullName;
101+
var imageNames = from imageName
102+
in Directory.EnumerateFiles(folderPath, "*.*", SearchOption.AllDirectories)
103+
where imageExtensions.Any(imageName.ToLower().EndsWith)
104+
select imageName;
104105
Debug.WriteLine($"Directory: {folderPath}; ImageCount: {imageNames.Count()}");
105106
if (imageNames.Count() < 2) { return null; }
106107

SimilarImages/SimilarImages/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
3333
//通过使用 "*",如下所示:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.3.1.0")]
36-
[assembly: AssemblyFileVersion("1.3.1.0")]
35+
[assembly: AssemblyVersion("1.4.0.0")]
36+
[assembly: AssemblyFileVersion("1.4.0.0")]

_Output/SimilarImages.exe

-291 KB
Binary file not shown.
-120 KB
Binary file not shown.

0 commit comments

Comments
 (0)