cimagl - Linux


cimagl is a versatile command-line tool designed for image manipulation and conversion tasks. It offers a wide range of features for resizing, cropping, rotating, and adjusting image attributes.


cimagl [options] <input-image> [<output-image>]

Required Arguments:

  • <input-image>: Path to the input image file.
  • <output-image> (Optional): Destination path for the output image. If not specified, the input file is overwritten.


  • -r: Resize the image to the specified width and height in pixels. Format: -r <width>x<height> (e.g., -r 640x480)
  • -c: Crop the image to the specified width and height, starting from the top-left corner. Format: -c <width>x<height> (e.g., -c 200x100)
  • -ro: Rotate the image counterclockwise by the specified number of degrees. Format: -ro <angle> (e.g., -ro 90)
  • -bw: Convert the image to grayscale (black and white).
  • -q: Specify the output image quality (0-100). Default: 95 (e.g., -q 80)
  • -v: Enable verbose output, providing additional information about the processing steps.
  • -h: Display help and usage information.


Resize an image:

cimagl -r 640x480 input.jpg output.jpg

Crop the top half of an image:

cimagl -c 640x240 input.jpg cropped.jpg

Rotate an image 90 degrees:

cimagl -ro 90 input.jpg rotated.jpg

Common Issues

  • File not found: Ensure that the input image file path is correct and the file exists.
  • Invalid arguments: Check the syntax of your command and make sure that you are providing valid values for the options.
  • Memory allocation errors: If you encounter errors related to memory allocation, try reducing the output image dimensions or quality.


Example script to resize and convert a batch of images:


for img in *.jpg; do
  cimagl -r 640x480 "$img" "output_$img" -q 75 -bw

Related Commands

  • convert (ImageMagick): A more comprehensive image manipulation tool with a wider range of features.
  • gimp (GIMP): A graphical user interface (GUI) for advanced image editing tasks.
  • exiftool (ExifTool): A tool for editing and extracting metadata from images.