Back to explorer
image-processing SDKs & libraries best source: official docs

cwebp

B−

grade

0%

reliability

+0.26

overall

cwebp is a command-line interface for encoding JPEG and PNG images into the WebP format. It provides precise control over parameters such as target file size, crop coordinates, and dimensions. An agent uses this tool to convert and compress static image assets for web deployment.

Surfaces × lenses

hostile friendly
surface ↓
lens →
Coherence Economy Consistency Verifiability Safety
Disclosure
Interface
Loop
Recursion
Human

Click any cell for what was measured and why. A corner dot marks a cell filled by a hard instrument (checker, telemetry); undotted cells are judged by the rater ensemble. 53% of this matrix is hard-measured.

The experience

The agent interacts with the tool exclusively via the command line, passing parameters to convert, resize, or crop images. Format conversion and optimization work well because the CLI syntax is predictable and adheres to standard UNIX conventions. Parameters like -q for quality and -preset for image characteristics allow the agent to translate instructions directly into executable statements without syntax errors.

Target size budgeting works well. By using the -size parameter, the agent specifies a hard target constraint in bytes, and the underlying encoder automatically searches for the appropriate quality value. This eliminates the need for the agent to write script loops to repeatedly compress, measure, and adjust files manually.

Geometry modifications including cropping and resizing work adequately but present a risk of calculation errors. Because cwebp executes -crop before -resize regardless of their position in the command string, the agent must compute crop coordinates based on the source image's original dimensions. The utility also lacks layout helpers like center gravity, forcing the agent to run a separate tool to obtain source dimensions and perform the arithmetic manually.

Complex image manipulation, such as compositing text labels, applying color adjustments, or creating drop shadows, works poorly because the tool does not support these features. The agent is forced to split its workflow, using a tool like ImageMagick to create a styled master file before calling cwebp to export the final WebP. This multi-tool pipeline is sometimes unreliable run-to-run, occasionally failing to render properly, although a resuming agent can recover safely using the persistent intermediate files.

Fit

This tool is a good fit for agents tasked with simple asset compression, batch format conversion, or automated image optimization where input dimensions are known. It operates efficiently when the agent needs to enforce file size budgets or generate optimized web-ready formats.

It is a poor fit for agents required to perform creative design, layout composition, watermark styling, or multi-layer image editing. For these workflows, the lack of composition features forces the agent to resort to multi-tool pipelines, which increases the likelihood of system failure.

Notes

The following diagram illustrates the multi-tool pipeline required to resize, watermark, and compress the asset to meet all target constraints.

Validation

Convergent check. Where a hard instrument and the independent rater panel measure the same cell, they agree on 7 of 16 cross-checked cells (75%). Two independent methods landing on the same number is our accuracy signal — not just the raters agreeing with each other.

Cell where they disagreeInstrumentRaterΔ
disclosure.verifiability-0.40+0.601.00
human.verifiability-0.20+0.700.90
recursion.coherence-0.40+0.400.80
loop.determinism-0.30+0.500.80
recursion.determinism+1.00+0.300.70
interface.verifiability+0.10+0.700.60
loop.economy+0.55+0.000.55
disclosure.economy-0.02+0.500.52
human.safety-0.10+0.400.50

Ground truth

4 of 4 requirements met · deterministic checker, no model judgment
  • WebP output produced — 131KB
  • JPEG fallback produced — 94KB
  • cropped to ~1.91:1 frame — 1200×630 (1.90:1)
  • each output under 200KB — 131KB, 94KB

Reliability (pass^k): one attempt succeeds 40% of the time · three in a row 0% · all runs 0%. A fresh agent resuming from the files alone never broke prior work.

Models & runs

2026-07-07
ModelHarnessRunsSolvedTurns
glm-5.2 PI2318/235

Each path is one run through the shared semantic space; nodes are turns (red = an errored turn). Hover a model — here or in the graph — to isolate its runs.

How this was measured

reference agent
pi:z-ai/glm-5.2
trials
25 (n=5/tier)
methodology
v0.1 3e74a3c6
cost
$0.6791
hard-measured cells
53%
teaching source
cwebp (official docs) (official-docs)

Same brief, same reference agent, and the same trial count for every tool in a category — a difference in the numbers is attributable to the tool (and its teaching source), not the setup. Profiles carry the methodology hash; results under different hashes are not compared.