A simple Java Swing application for batch-renaming and cropping photos with zoom, pan, and keyboard shortcuts.
This application was developed during my internship at Stellantis as a practical tool to assist in the visualization and organization of industrial material samples.
In the automotive industry, each material sample is associated with a codified color and grain reference. The tool simplifies the manual process of renaming and cropping photographic samples by allowing fast, keyboard-driven input and cropping. It was specifically designed to improve the workflow for reviewing and cataloging visual standards.
- Reads photos from the
input_color/folder - Displays them in fullscreen with zoom and pan functionality
- Automatically overlays a movable 1:1 square crop zone
- Lets the user enter:
- A color code (
ABC) - A grain code (
Z123) - A checkbox for “Flop” (used when the photo is taken from an angle)
- A color code (
- When the user presses
Ctrl + Gor clicks Rename & Next:- The crop area is extracted and saved as a new image
- The image is renamed using the format:
ABC-Z123.jpgorABC-Z123_flop.jpg - The renamed image is saved inside a subfolder of
output_color/based on the first two letters of the color code - The original file is moved to
trash_color/
- Color code: ABC ➜ Saved as: output_color/AB/ABC-Z123.jpg
- Images formats (
.jpg,.jpeg,.png) - Not Compatable with
.HEICfor iPhone pictures -> On your iPhone, open Settings → Camera → Formats. Select “Most Compatible” (JPEG) instead of High Efficiency (HEIC). - Crop size slider (50–500 px)
- Resizable crop: If you don't like the default crop size, you can cahnge it by modifying the
CROP_SIZEvalue in the codeprivate static final int CROP_SIZE = 200; // change this to adjust default crop size
- Keyboard shortcuts:
- Ctrl + D → Delete current image
- Ctrl + F → Toggle “Flop”
- Ctrl + G → Rename & load next
- Esc → Exit application
- Java 11 or higher installed
- Eclipse IDE 2023-06 (or any recent Eclipse)
- Image files in
input_color/folder
ColorCodePhotosApp/
├── input_color/ # Put your source photos here (jpg, png, etc.)
├── output_color/ # Cropped & renamed photos are saved here
├── trash_color/ # “deleted” images get moved here if you made a mistake and want to retake it
└── src/
└── app/
└── ColorCodePhotosApp.java # Main Java Swing application
- Clone or download the zip file.
- Open Eclipse (e.g. Eclipse IDE for Java Developers).
- File → Import…
- Under General, choose Existing Projects into Workspace, then click Next.
- Select Archive file (if you downloaded the ZIP) or Select root directory (if you unzipped).
- If using ZIP: click Browse…, navigate to ColorCodePhotosApp.zip, and select it.
- If using unzipped folder: click Browse…, navigate to the folder ColorCodePhotosApp, and select it.
- Eclipse will detect the project. Make sure ColorCodePhotosApp is checked, then click Finish.
- Ensure your source images live in the
input_color/directory. - Right click ColorPhotosApp under the Project Explorer menu on the left.
- Run as a Java Application.
- Use the toolbar or shortcuts to rename, crop, delete, and advance.
If you encounter any bugs or issues, feel free to report them or reach out via my website contact form here:
👉 Send me a message !
