A robust Command Line Interface (CLI) tool built with C# .NET 10 to automate batch image resizing. This project uses ImageSharp for efficient, cross-platform image processing.
- Proportional Resizing: Define the target height, and the width is automatically calculated to maintain the original aspect ratio.
- Automatic Organization:
- Monitors a specific Input folder.
- Moves original files to a Finished folder.
- Saves processed images to a Resized folder.
- Smart Naming: Adds a unique timestamp to processed files to prevent overwriting.
- Cross-Platform: Runs natively on Windows and Linux (including single-file executable support).
Upon execution, the tool automatically creates the following directory structure:
/ (Executable Root)
│
├── Input_Files/ <-- Drop your original images here
├── Resized_Files/ <-- Resized images will appear here
└── Finished_Files/ <-- Original images are moved here after processing
-
Clone the repository:
git clone https://github.com/SavioDec/Image_Resizer.git cd Image_Resizer -
Restore dependencies:
dotnet restore -
Run the application:
dotnet run
Use the following commands to generate a single, self-contained executable (no .NET installation required on the target machine).
Generates a single binary file with native dependencies included.
dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None
Output location: bin/Release/net10.0/linux-x64/publish/
Generates a single .exe file.
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:DebugType=None
Output location: bin/Release/net10.0/win-x64/publish/
- Run the executable.
- The program asks:
Enter the desired new height: - You type:
200(and press Enter). - Drop an image (e.g.,
photo.jpg) into theInput_Filesfolder. - The tool automatically:
- Creates a resized version (e.g.,
photo_20260118_143000.jpg) inResized_Files. - Moves the original
photo.jpgtoFinished_Files.
- Creates a resized version (e.g.,
This project is for educational purposes and is licensed under the MIT License.