ImgOps Node
The ImgOps node handles deterministic image processing — resize, rotate, format-convert, generate favicon and app-icon sets, edge-detect, watermark, strip metadata, and a set of OpenCV operations: clean edge maps, thresholding, and shape/contour detection that measures the image and returns exact counts and geometry. It's the algorithmic sibling to the Vision node, which handles AI-driven image work.
Think of it this way: if the operation has a single right answer (resize to 512×512, convert to WebP, generate iOS app icons), use ImgOps. If the operation needs a model (read this handwriting, describe the scene, remove the background intelligently), use Vision.
Quick start
- Drop an ImgOps node onto the canvas.
- Wire an image upstream — from an Image node, a Files node iteration, a Vision node, or any node that produces an image.
- Open the config panel and pick an operation. They're grouped:
- Geometry — resize, rotate, flip, crop
- Format — convert PNG / JPG / WebP / AVIF / HEIC, strip metadata
- Filter — edge detection, watermark, Canny edges, threshold
- Detect (OpenCV) — find contours, detect shapes
- Asset Set — favicon set (web), app icon set (iOS / Android)
The node shows a live preview as you change settings. When the upstream image is ready, the result is one click away — a single image (with a Download button beside the preview), a collection of files (Download as ZIP), or — for the Detect operations — a list of measurements with an annotated preview (Download as JSON).
Engines
ImgOps runs in several tiers depending on where you are:
| Engine | Where | Notes |
|---|---|---|
| In-browser | iPad, any web browser | Works everywhere. Covers the Geometry / Format / Filter / Asset Set operations. |
| OpenCV (in-browser) | Any web browser | Powers the Canny, Threshold, and Detect operations. The OpenCV library loads on first use, so the first run takes a moment longer; after that it's instant. |
| EServer-accelerated | Browser paired with an EServer, or the Electron app | Used automatically for AVIF / HEIC encoding and higher-quality scaling. |
| AI-assisted | Routes through Vision-node providers | Reserved for super-resolution upscaling (coming next). |
The default Auto setting picks the best available engine. The OpenCV operations always run in the browser. You can pin the engine to In-browser for predictable behaviour, or EServer-accelerated to require the higher-quality path.
Operations
Geometry
| Operation | What it does |
|---|---|
| Resize | Scale to specific dimensions, longest-edge, or by percentage. Fit, fill, stretch, or letterbox. |
| Rotate | Rotate by 90 / 180 / 270 or any arbitrary angle; canvas auto-expands. |
| Flip | Mirror horizontally, vertically, or both. |
| Crop | Cut a rectangular region by coordinates. |
Format
| Operation | What it does |
|---|---|
| Convert Format | Re-encode as PNG / JPG / WebP / AVIF / HEIC with quality control. The pipeline carries the converted bytes, so downstream Save lands the right extension. |
| Strip Metadata | Remove EXIF / GPS / camera info by re-encoding. Useful before publishing photos. |
Filter
| Operation | What it does |
|---|---|
| Edge Detection | Sobel, Prewitt, or Laplacian kernel. Adjustable threshold. |
| Watermark | Overlay text or an image onto the source. Five anchor positions, configurable opacity and font size. |
| Canny Edges (OpenCV) | A more advanced edge detector that produces clean, connected outlines — better than the basic kernels for tracing object boundaries. Two sensitivity sliders (edge low / edge high). |
| Threshold (OpenCV) | Turn an image into pure black-and-white. Choose Otsu (picks the cutoff automatically), a fixed value, or adaptive (varies the cutoff across the image for uneven lighting). Optionally invert. Great as a clean-up step before the Detect operations or before sending to a Vision OCR step. |
Detect (OpenCV)
These operations measure the image instead of producing a new picture. They output a list of findings — counts, sizes, positions — plus an annotated preview with the detections drawn on top. The structured result flows downstream to a Sheet or Code node so you can filter, sort, or act on it.
| Operation | What it does |
|---|---|
| Find Contours (OpenCV) | Detects every distinct blob/shape and reports an exact count plus each region's area, bounding box, and centre point. This is the precise, deterministic answer to "how many?" — where the Vision node's Count gives a best-guess estimate, Find Contours gives you a real number with the geometry behind it. A Min area slider drops noise; the edge sensitivity sliders tune what counts as an edge. |
| Detect Shapes (OpenCV) | Classifies each region as a triangle, square, rectangle, pentagon, circle, or polygon, with a tally and per-shape sizes. Useful for turning a rough sketch or diagram into structured primitives. A Shape tolerance slider controls how forgiving the matching is. |
Both Detect operations have a Draw detections on image toggle — on by default — that overlays the found regions on the preview so you can see what was matched at a glance.
Asset Set (multi-output)
| Operation | What it does |
|---|---|
| Favicon Set (Web) | Generates the full favicon kit: 16/32/48/192/512 PNGs, apple-touch-icon, multi-resolution favicon.ico, and site.webmanifest. |
| App Icon Set (iOS / Android) | Generates an iOS .appiconset with Contents.json, an Android mipmap density bucket tree, or both. |
Inputs and outputs
Input
The node looks for an image on its incoming edge, checking — in this order — value, image, __image__, imageData, processedImage, output. Any upstream node that publishes one of those with a data URL feeds ImgOps correctly.
Output
- Single-image ops →
{ type: 'image', imageData, value, width, height, mimeType, outputExt, outputMimeType }. The bytes are the actual converted image;outputExtandoutputMimeTypedescribe what's inimageDataright now. - Multi-output ops →
{ type: 'files', value: [{ name, content, mimeType, outputExt }, …], count, preset, totalBytes }. Each file'snameincludes its relative subdirectory (e.g.AppIcon.appiconset/icon-1024.png), so when you chain into a Save node the folder structure lands on disk correctly. - Detect ops →
{ type: 'data', count, data, value, text, imageData? }.data(and its aliasvalue) holds the structured findings — for Find Contours,{ count, regions: [{ area, bbox, centroid }] }; for Detect Shapes,{ count, tally, shapes: [{ shape, vertices, area, bbox }] }.textis the human-readable summary shown on the node, andimageDatais the annotated preview when Draw detections is on. Wiredatainto a Sheet or Code node to work with the findings.
Format-intent flow
When you convert, say, a JPG into WebP, the actual bytes in the pipeline change — they become WebP bytes. outputExt becomes webp and outputMimeType becomes image/webp. The downstream Save node reads those hints and writes a .webp file with no extra configuration.
Example workflows
1. Generate a favicon set for a new site
Image (your logo) ──▶ ImgOps (Favicon Set) ──▶ Save (to project /public)
The Save node lands every file — PNGs, apple-touch-icon, favicon.ico, site.webmanifest — in your public folder with the right names. Or click the Download as ZIP button on the ImgOps node to grab the whole bundle without writing to disk.
2. Convert and downscale a folder of photos
Files (iterate /photos/*.jpg) ──▶ ImgOps (Resize 1600 longest-edge) ──▶ ImgOps (Convert WebP, quality 0.85) ──▶ Save
The two ImgOps nodes operate per-iteration. Save writes each result with .webp extension thanks to format-intent propagation.
3. iOS app icon set from a single 1024×1024 source
Image (icon-master.png) ──▶ ImgOps (App Icon Set, platform: iOS) ──▶ Save (to /ios/MyApp/Assets.xcassets)
Save preserves the AppIcon.appiconset/ subdirectory hierarchy. Drop the result into Xcode and you're done.
4. Strip EXIF before publishing
Image ──▶ ImgOps (Strip Metadata) ──▶ Save (to /public/uploads)
The re-encode drops EXIF (including GPS coordinates) without changing the visible image.
5. Edge map for an AI vision pipeline
Image ──▶ ImgOps (Canny Edges) ──▶ Vision (Describe Image)
Some vision models classify line drawings better than photos. The clean Canny edge map gives Vision a sharper input than a raw photo.
6. Count objects exactly and act on the result
Image ──▶ ImgOps (Threshold, Otsu) ──▶ ImgOps (Find Contours) ──▶ Sheet
Threshold first to get clean black-and-white regions, then Find Contours returns an exact count with every region's area and position. Feed the result into a Sheet to sort the largest items, or into a Condition node to branch on the count — a precise, repeatable measurement that doesn't depend on a model's estimate.
7. Turn a hand-drawn sketch into shapes
Image (whiteboard photo) ──▶ ImgOps (Detect Shapes) ──▶ Code (build a diagram)
Detect Shapes labels each region (square, circle, triangle…) with its position and size — a structured starting point for reconstructing a diagram or wireframe.
Tips
- Use Auto for the engine unless you need a specific behaviour. The node picks the best available path.
- Format conversion is eager — if you set the target to JPEG, the output is already JPEG bytes. Save and downstream nodes don't need to know what the original was.
- Subdirectories in multi-output ops are baked into each file's
name— so Save and the Download ZIP button both respect the same structure. - The Download button on the node is a shortcut. It downloads what the preview shows, without needing to wire a Save node — an image, a ZIP for asset sets, or a JSON file for the Detect operations.
- The first OpenCV operation in a session loads the OpenCV library (a one-time moment of "Loading…"). Every run after that is instant.
- Threshold before Detect. Find Contours and Detect Shapes are most accurate on clean black-and-white input — put a Threshold (Otsu) step in front when working from photos or noisy images.
Related
- Vision Node — AI-driven image work (OCR, describe, classify, remove background)
- Image Node — viewer + source for the workflow image bus
- Files Node — iterate over a folder of images
- Save Node — write ImgOps output to disk