Utilities » Image conversion utility

Converts images of different formats.

This utility is built if both WITH_TRADE and WITH_IMAGECONVERTER is enabled when building Magnum. To use this utility with CMake, you need to request the imageconverter component of the Magnum package and use the Magnum::imageconverter target for example in a custom command:

find_package(Magnum REQUIRED imageconverter)

add_custom_command(OUTPUT ... COMMAND Magnum::imageconverter ...)

See Downloading and building, Usage with CMake and the Trade namespace for more information.

Usage

magnum-imageconverter [-h|--help] [--importer IMPORTER] [--converter CONVERTER]
    [--plugin-dir DIR] [--] input output

Arguments:

  • input — input image
  • output — output image
  • -h, --help — display this help message and exit
  • --importer IMPORTER — image importer plugin (default: AnyImageImporter)
  • --converter CONVERTER — image converter plugin (default: AnyImageConverter)
  • --plugin-dir DIR — override base plugin dir

Example usage

Converting a JPEG file to a PNG:

magnum-imageconverter image.jpg image.png