Skip to content

Image Processing and Enhancement

Image capabilities are split into synchronous processing and asynchronous enhancement.

Synchronous Image Processing

image.process runs page processing, color mode, and output formatting together:

json
{
  "request_id": "req-image-001",
  "method": "image.process",
  "params": {
    "input_upload_id": "img-...",
    "page_processing": "single_page",
    "color_mode": "auto_optimize",
    "output_format": "jpg",
    "single_page": {
      "auto_rotate": true,
      "smart_black_edge_optimize": true
    }
  }
}

image.process_page only runs page processing and keeps the input image format. image.apply_color_mode only applies color mode and also keeps the input image format.

Asynchronous Image Enhancement

Query capabilities first:

json
{
  "request_id": "req-enhance-cap-001",
  "method": "image.enhance_capabilities",
  "params": {}
}

The response data.providers[].capabilities[] describes available enhancement capabilities. When composing a pipeline, read type, defaults, schema, and localized copy from each capability. See Image API - Enhance capabilities Response Shape for the full response shape.

Submit a pipeline:

json
{
  "request_id": "req-enhance-001",
  "method": "image.enhance",
  "params": {
    "source": {
      "input_upload_ids": ["img-..."]
    },
    "pipeline": {
      "version": "image.enhance.pipeline.v1",
      "steps": [
        {
          "id": "blank",
          "type": "blank_page_detect",
          "enabled": true,
          "params": { "action": "drop" }
        },
        {
          "id": "normalize",
          "type": "normalize",
          "enabled": true,
          "params": { "target": "a4" }
        }
      ],
      "target": {
        "type": "pdf",
        "format": "pdf",
        "export_type": "multi-page"
      }
    }
  }
}

Use image.enhance_get to query the task and image.enhance_cancel to cancel it.

Workflow

image.enhance_workflow_save stores reusable pipelines for later capture or SANE scan flows:

json
{
  "method": "image.enhance_workflow_save",
  "params": {
    "name": "A4 clean PDF",
    "description": "drop blank pages and export PDF",
    "pipeline": {
      "version": "image.enhance.pipeline.v1",
      "steps": [],
      "target": { "type": "pdf", "format": "pdf", "export_type": "multi-page" }
    }
  }
}

CZUR Open Platform Documentation