Image Tools
Metadata, ubah ukuran, crop, putar, konversi (jpeg/png/webp/avif), kompres, watermark teks atau gambar dan thumbnail. Format raster dikenali dari isinya, batas piksel terdekode melawan decompression bomb, hanya membuat file output baru
Tentang
Plugin Graphrt untuk gambar lokal dengan sharp (libvips). Workflow dan agent bisa membaca metadata gambar serta mengubah ukuran, meng-crop, memutar, mengonversi, mengompres, memberi watermark dan membuat thumbnail gambar di folder yang kamu izinkan. Setiap hasil adalah file baru di satu folder output.
Yang bisa dilakukan
- metadata: format (detected from the content), displayed width/height after EXIF orientation, orientation, channels, colour space, alpha, density, pages, and whether EXIF/ICC/XMP data is present.
- resize: target_width and/or target_height, fit (inside, cover, contain, fill, outside), no enlarging unless enlarge: true, padding background for contain.
- crop: left, top, crop_width, crop_height on the displayed image, a box outside the image is refused.
- rotate: any angle (corners filled with background), plus flip/flop.
- convert: jpeg, png, webp, avif, gif or tiff with optional quality.
- compress: re-encodes at quality (default 75), optionally capping the longest side, and reports the bytes saved.
- watermark: a text line (text, font_size, color) or a second image (image, image_scale) at one of nine positions (placement) with margin and opacity.
- thumbnails: up to 10 widths in one call (default webp, never enlarged).
Aksi
Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.
- Read image metadata
image-tools.metadata - Resize an image
image-tools.resize - Crop an image
image-tools.crop - Rotate or flip an image
image-tools.rotate - Convert an image
image-tools.convert - Compress an image
image-tools.compress - Make thumbnails
image-tools.thumbnails - Add a watermark
image-tools.watermark
Pengaturan
Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.
-
IMAGE_TOOLS_INPUT_DIRS(required)Comma-separated directories (absolute or ~/...) that images may be read from, subdirectories included -
IMAGE_TOOLS_OUTPUT_DIR(none)Existing directory for outputs. Without it only metadata works. Outputs can be read back as inputs. -
IMAGE_TOOLS_MAX_INPUT_BYTES100 MiBLargest input file -
IMAGE_TOOLS_MAX_OUTPUT_BYTES100 MiBLargest output, nothing is written above it -
IMAGE_TOOLS_MAX_INPUT_PIXELS100000000Most decoded pixels (width × height) per image, against decompression bombs -
IMAGE_TOOLS_TIMEOUT_SECONDS60libvips timeout per pipeline (1 to 600)
Cara memakainya
Di Graphrt Desktop
- Buka Plugins dan cari Image Tools.
- Klik Install lalu setujui.
- Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
- Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Dengan CLI
$ graphrt plugin install image-tools - id: image_tools type: image-tools.metadata