⚠️ Warning: This program is built for personal use. It is not tested for general use. Use at your own risk.
- Node.js (>= 18.0.0)
- pnpm (>= 8.0.0)
-
Clone this repository.
git clone https://github.com/shalluv/manually-crop-bulk-images.git
or download the zip file.
-
Install dependencies.
pnpm install
-
Put your images in the
/src/assets/
folder. -
Run the rename script to rename all images in the
/src/assets/
folder to a 3-digit number with the original file extension. This step is necessary for the program to work.⚠️ Warning: The rename script can cause problems if you don’t know what you’re doing. Please read the script before running it.pnpm rename
-
Run the script by executing the following command:
pnpm build pnpm preview
-
Open
http://localhost:4321
in your browser. -
You should be good to go!
- Click on the image you want to crop.
- Select 4 points on the image to create a rectangle.
- Adjust the rectangle by dragging the points.
- Click the "Confirm" button to crop the image.
- Repeat these steps for all images.
- Since the program is using the localStorage API, you can close the browser and continue later.
- When you want to start over, click the "Reset" button.
- The program only supports cropping images to a rectangle.
- The program only test with images in the
.jpg
format. - The program only capable of 999 images.
- You can adjust the limit by yourself
Suggestions, issues, and pull requests are welcome! Feel free to do it! 😘