Rules
User wants to convert an image/change dimensions/make an ICO/convert to Base64 → run cyeam image convert → return the result.
用户: "把这张 PNG 转 JPG" → cyeam image convert input.png -f jpg
用户: "把这图缩小到宽 800" → cyeam image convert input.png -w 800 -f jpg
用户: "做一个 favicon.ico" → cyeam image convert input.png -f ico
用户: "转成 WebP" → cyeam image convert input.png -f webp
用户: "转成 Base64" → cyeam image convert input.png -f base64
Command
cyeam image convert <input> -f <format> [options]
Parameters:
| Parameter | Description |
|---|---|
-f, --format |
Target format (required): jpg / png / webp / gif / ico / base64 |
-o, --out |
Output file path (when unspecified, use <原名>.<新扩展名>) |
-q, --quality |
JPG quality 1-100 (default 90, WebP is lossless, this parameter has no effect) |
-w, --width |
Target width px |
-H, --height |
Target height px |
--keep-ratio |
When only width or height is given, scale proportionally (default true) |
Supported formats
- Input: PNG / JPG / GIF / WebP / SVG (rasterized)
- Output: PNG / JPG / GIF / WebP (lossless) / ICO (multi-size 16/32/48px favicon) / Base64 (data URL)
Output
jpg/png/webp/gif/ico: write to file, stdout outputssaved: <path>base64: directly output data URL text to stdout (can be combined with--prettyfor clean output)
Notes
- No login required
- SVG input will be rasterized into a bitmap (256×256 by default, can be specified via width and height)
- ICO output automatically includes three sizes 16/32/48, and browsers pick as needed
- WebP output is lossless VP8L (preserves all details)
- Use
--prettyto remove the JSON envelope and only see the output