Convert Command

The convert command is the primary tool for all image processing tasks.

.\imgtool.exe convert [input_path] [output_path] [flags]

Arguments

Flags

Examples

  1. Convert a PNG to a high-quality JPG

    bash .\imgtool.exe convert input.png output.jpg --to jpg --quality 95

  2. Resize an image to 50% of its original size

    bash .\imgtool.exe convert big.jpg small.jpg --resize "50%"

  3. Apply a watermark to an image

    bash .\imgtool.exe convert photo.png watermarked.png --watermark logo.png --watermark-opacity 70

  4. Process an entire directory of images

    This command converts all images in the input-folder to webp and saves them in output-folder.

    bash .\imgtool.exe convert input-folder output-folder --mode dir --to webp