Skip to content

Hummus-Ful/PhotoJar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhotoJar

Search and list duplicate and similar photos in a given directory and all sub-directories.

Description

We live in a time where we share and store endless amounts of photos.
This tool was built because I had to organize my family photos in a hard-drive and I found many duplicated photos. For example:
If I take a photo on my phone and share it with my partner using WhatsApp, a copy (not exact copy though!) of that photo was created on their phone. Backing up these duplicate photos will consume much needed hard-disk space.
Now, you can try locating these duplicate using hash (MD5 for example), yet every small change to the photo will create a significant different hash value. WhatApp for example will remove EXIF data and lower the photo resolution. herefore the hash will be different.
This application is using Perceptual hashing and other techniques to list similar photos within a given directory and its sub-directories, and put list the similar photos that you can delete.
(Examples TBD)

Getting Started

Pre-Requisites and Dependencies

  • Java Runtime Environment(JRE) version 11 or above. Use java --version to check the installed version on your machine
  • Open-Source dependencies are listed in the build.gradle file

Installation

  • Clone the repo git https://github.com/Hummus-Ful/PhotoJar.git
  • Change directory to the project directory cd ./PhotoJar/
  • Build the jar ./gradlew build jar
  • Copy the PhotoJar-VERSION.jar file from the build/lib/ directory (you can leave it there and simply run it)

Usage

  • locate the path of the root directory/directories you want to scan
  • Run the tool and provide the path/s java -jar /path/to/PhotoJar-VERSION.jar /path/to/dir1 /path/to/another/dir2
  • The tool will output:
    • HTML + text files for exact duplicate
    • HTML + text files for simliar photos (look the same but has different hash value)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

License

This project is licensed under the MIT License - see the LICENSE file for details

Special Thank You

To Tutanota for supporting Open-Source projects just like this one.

(back to top)