guardar_preset
Save image format and processing options as a reusable Apolo preset for the CLI or MCP interface; duplicate names are rejected, so edit or delete presets in Apolo.
Instructions
Saves a combination of format and options as a new preset, to use in Apolo, on the command line or here. It doesn't overwrite: if the name exists, it's an error (changing or deleting presets is done in Apolo). Example: {"nombre": "Light web", "formato": "avif", "nota_objetivo": 75, "ancho": 1920}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alto | No | Maximum height, in pixels: scales down if larger and never enlarges (with ancho alone, proportional). | |
| ancho | No | Maximum width, in pixels: scales down if larger and never enlarges (with alto alone, proportional). | |
| orden | No | Options of the official tool, as they are: “-q 80 -m 6” (cwebp), “-quality 85 -progressive” (cjpeg), “-o 4” (oxipng), “-q 60 -s 6” (avifenc), “-d 1 -e 7” (cjxl). It may start with the tool's name. For its format, it replaces the preset's options. | |
| nombre | Yes | The name of the new preset. It can't exist already. | |
| paleta | No | Reduce the palette to this number of colors (2 to 256), with dithering: mainly for PNGs of logos, icons and screenshots. | |
| preset | No | A saved preset (listar_presets lists them). It is the base for everything else. | |
| calidad | No | Fixed quality from 0 to 100. Not together with nota_objetivo. | |
| formato | No | webp, jpeg, png, qoi, avif or jxl. By default, the preset's, or webp. | |
| recorte | No | Crop to this rectangle, before resizing (in pixels of the already auto-rotated image; whatever goes past the edge is trimmed). | |
| enderezar | No | Auto-rotate according to the EXIF orientation if the photo needs it. Yes by default. | |
| lado_mayor | No | Maximum longest side, in pixels: the width if landscape, the height if portrait; never enlarges. Not together with ancho, alto or porcentaje. | |
| porcentaje | No | Reduce to this percentage (50 = half the width and height). From above 0 to 100. Not together with ancho, alto or lado_mayor. | |
| sin_perdida | No | Lossless (WebP, AVIF, JPEG XL). PNG and QOI always are. | |
| nota_objetivo | No | Search for the lowest quality that gives this SSIMULACRA 2 score (90 indistinguishable; 80 very high; 70 high; 50 medium). Takes a few seconds. |