Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Auto Convert

IP Command Grooper.IP

Automatically converts an image to color, grayscale, or black and white based on its content.

Remarks

The Auto Convert command analyzes the content of an image and selects the most appropriate color depth for output, optimizing both storage and image fidelity. This command is designed for workflows where document images may contain a mix of color, grayscale, and black-and-white content, and where minimizing file size without sacrificing important information is a priority.

The command works by first detecting whether the image contains color using configurable detection settings. If color is present, the image is output as 24-bit color. If no color is detected but significant grayscale content is present, the image is output as 8-bit grayscale. Otherwise, the image is converted to black and white (binary).

How It Works

  1. Color Detection:
    The image is analyzed using the settings in 'Color Detection Settings'. If color is detected, the image is preserved as color. This is useful for documents with highlights, stamps, or colored marks that need to be retained.

  2. Grayscale Analysis:
    If no color is found, the command evaluates the amount of grayscale content using the 'Grayscale Tolerance' property. If the percentage of grayscale pixels exceeds the configured threshold, the image is output as grayscale. This helps preserve subtle shading or pencil marks that would be lost in binary conversion.

  3. Binary Conversion:
    If the image is neither color nor sufficiently grayscale, it is converted to black and white using the settings in 'Threshold Settings'. The 'Binary Cutoff' property can be used to prevent low-resolution images from being converted to binary, which can help preserve legibility.

Supported Pixel Formats

  • All common pixel formats are supported except 1-bit images, which are left unchanged.
  • Supported formats include: Pixel24bppBgr, Pixel32bppBgr, Pixel32bppBgra, Pixel32bppCmyk, Pixel64bppBgra, Pixel8bppIndexed, Pixel4bppIndexed, Pixel16bppGrayscale, Pixel16bppGrayscaleAlpha, Pixel8bppGrayscale.

Diagnostics

When diagnostic mode is enabled, Auto Convert generates detailed logs and diagnostic images to assist with tuning detection and conversion parameters. Diagnostics include:

  • Input and output pixel format logs.
  • Color detection results and diagnostic overlays.
  • Grayscale analysis metrics.
  • Binary conversion previews.

Use these diagnostics to fine-tune the command for your specific document set.

Configuration Guidance

  • Adjust 'Color Detection Settings' to control how faint or subtle color is detected.
  • Use 'Threshold Settings' to optimize binary output for OCR or file size.
  • Set 'Grayscale Tolerance' to balance between binary and grayscale output.
  • Configure 'Binary Cutoff' to avoid converting low-resolution images to binary, which can degrade quality.

Properties

NameTypeDescription
General
Command Info

See Also

Used By

Notification