Skip to content

Screen Image Push

Push specified screen area image directly to custom API service for processing, suitable for various image recognition scenarios.

Application Scenarios

This interface is particularly suitable for the following scenarios:

  • 🔤 OCR Text Recognition - Integrate third-party OCR services (such as PaddleOCR, Tesseract, etc.)
  • 🎯 Captcha Recognition - Use specialized captcha recognition services
  • 🖼️ Image Classification - Identify image content, object detection
  • 🤖 AI Recognition - Integrate any custom image AI model

💡 How It Works

Streaming End → Capture Image → Direct POST → Your API → Return Result

Images are sent directly from the streaming end to your API, saving decoding and redundant transmission steps, improving efficiency.

Difference from getScreenShot

Comparison

FeaturescreenPushgetScreenShot
Data FlowStreaming end → Your APIStreaming end → iClick main process → Caller
Transmissions1 (direct push)2 (first to main process, then to API)
Resource UsageLow (not through main process)High (requires decoding and passing in main process)

Interface Description

Interface Type

screenPush

Parameters

ParameterTypeRequiredDescription
apistringYesYour API service address
argsobjectNoCustom parameter object, will be passed as-is to API server
qualitynumberNoImage quality (0-1), default 0.8
scalenumberNoScale ratio (0-1), default 1.0

Request Format

iClick will send POST request to your API. To save unnecessary resources, after the streaming end successfully pushes, it will not wait for the result and return it to the caller. screenPush will always return true, and you need to implement your own business callback logic.

Request Headers:

Content-Type: multipart/form-data

Request Body:

image: <Image binary data (screenshot)>

If args parameter is provided, all fields will be passed as additional form fields:

image: <Image binary data>
rect: [100, 100, 500, 200]     // If args.rect exists
customField: "value"            // Your custom field
...

Basic Usage

javascript
// Captcha recognition example
await apiInvoke('screenPush', {
    api: 'http://localhost:5000/resolve_captcha',
    args: {
        rect: [100, 300, 275, 360],  
        type: 'digits',
        ...
    }
});

Cooperation: try.catch@foxmail.com