ImageMagick – MagickCore, C API: Monitor the Progress of an Image Operation
Author: ImageMagick Studio LLC
Description: ImageMagick is a powerful, open-source software suite for creating, editing, converting, and manipulating images in over 200 formats. Ideal for web developers, graphic designers, and researchers, it offers versatile tools for image processing, including batch processing, format conversion, and complex image transformations.
Keywords: MagickCore, C API: Monitor the Progress of an Image Operation, Image Processing, Digital Image Editing, Image Conversion, Open-Source Software, Image Manipulation, Command-Line Image Tools

# Monitor

## SetImageProgress

SetImageProgress() calls the monitoring callback with the progress of an image processing operation. It also sets the `monitor:progress` image artifact available with GetImageArtifact().

The format of the SetImageProgress method is:

        MagickBooleanType SetImageProgress(const char *text,
    const MagickOffsetType offset,const MagickSizeType extent)

A description of each parameter follows:

image
  the image.
text
  description of the image processing operation.
offset
  the offset relative to the extent parameter.
extent
  the extent of the progress.

## SetImageProgressMonitor

SetImageProgressMonitor() sets the image progress monitor to the specified method and returns the previous progress monitor if any. The progress monitor method looks like this:

        MagickBooleanType MagickProgressMonitor(const char *text,
    const MagickOffsetType offset,const MagickSizeType extent,
    void *client_data)

If the progress monitor returns MagickFalse, the current operation is interrupted.

The format of the SetImageProgressMonitor method is:

    MagickProgressMonitor SetImageProgressMonitor(Image *image,
      const MagickProgressMonitor progress_monitor,void *client_data)

A description of each parameter follows:

image
  the image.
progress_monitor
  Specifies a pointer to a method to monitor progress of an image operation.
client_data
  Specifies a pointer to any client data.

## SetImageInfoProgressMonitor

SetImageInfoProgressMonitor() sets the image_info progress monitor to the specified method and returns the previous progress monitor if any. The progress monitor method looks like this:

        MagickBooleanType MagickProgressMonitor(const char *text,
    const MagickOffsetType offset,const MagickSizeType extent,
    void *client_data)

If the progress monitor returns MagickFalse, the current operation is interrupted.

The format of the SetImageInfoProgressMonitor method is:

    MagickProgressMonitor SetImageInfoProgressMonitor(ImageInfo *image_info,
      const MagickProgressMonitor progress_monitor,void *client_data)

A description of each parameter follows:

image_info
  the image info.
progress_monitor
  Specifies a pointer to a method to monitor progress of an image operation.
client_data
  Specifies a pointer to any client data.