imgp
Resize and optimize images
TLDR
Convert single images and/or whole directories containing valid image formats
Scale an image by 75% and overwrite the source image to a target resolution
Rotate an image clockwise by 90 degrees
SYNOPSIS
imgp [options] [images...]
PARAMETERS
--help
Display help message and exit.
--version
Show version information and exit.
-r, --recursive
Process images in subdirectories recursively.
-d, --directory
Specify the output directory (default: same as input).
-q, --quality
Set the JPEG quality (0-100, default: 75).
-w, --width
Resize images to a specified width (aspect ratio preserved).
-h, --height
Resize images to a specified height (aspect ratio preserved).
-s, --size
Resize images to a specific size.
-f, --format
Convert images to a specified format (e.g., jpg, png, gif).
-o, --optimize
Optimize images for web use (lossless compression).
-n, --name
Rename images using a pattern (e.g., image_%%03d.jpg).
-c, --crop
Crop images.
DESCRIPTION
imgp is a command-line image manipulation tool designed for batch processing images. It provides a simple and efficient way to resize, rename, optimize, and perform other common image operations on multiple files at once.
imgp is particularly useful for preparing images for web use, archiving, or other scenarios where consistent image processing is required. It aims to simplify repetitive tasks and streamline image workflows, making it an excellent choice for both novice and experienced users who need to work with large numbers of image files. The tool supports various image formats and offers a range of options to customize the processing pipeline, giving users fine-grained control over the output. With its command-line interface, imgp can easily be integrated into scripts and automated workflows.
EXAMPLES
- Resize all JPEG images in the current directory to a width of 800 pixels: imgp -w 800 *.jpg
- Convert all PNG images to JPEG format and save them in the 'output' directory: imgp -f jpg -d output *.png
- Recursively process all images in subdirectories, optimize them, and rename them using a sequential pattern: imgp -r -o -n image_%%04d.jpg *.jpg *.png