This project was created out of the need to get simple and fast tool to label and crop/rotate a lot of images. The intention of this project is not being a pretty piece of code - it just works and is as simple as possible.
- Label by keys [1-9]
- rotate [a,d]
- save [s]
- reset [q]
- duplicate [x]
- Configurable quality indicator
- Based on Cropper.js
- Clone this repository into a directory
- Edit
src/config.php
:
'SOURCE_DIR'=> "path_to_source_image_dir",
'TARGET_DIR' => "path_to_target_dir",
'CATEGORIES' => array(
'c' => "cat1",
'd' => "cat2",
);
'PROTO' => "'https://' or 'http://' when running local"
- Make sure
SOURCE_DIR
andTARGET_DIR
is writeable by the webserver user - Run the PHP builtin server in the project root:
/usr/bin/php -S localhost:8080
- If you want to run this for example through apache, I highly recommend to setup a
Basic Auth
using a.htaccess
file:
AuthType Basic
AuthName "Simple Image Labeler"
AuthUserFile /path/to/.htpasswd
Require valid-user
First, it takes the original file from SOURCE_DIR
, moves it to
TARGET_DIR
/cat/orig
. Then if the image has been cropped and/or rotated,
the new image is created at TARGET_DIR
/cat/crop
.
This software is not secure. You are responsible to restrict access and you use this software at your own risk!
Feedback and ideas are always welcome!