ImgOps Node
The ImgOps node handles deterministic image processing — layering several images into one, 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:
- Compose — layers: stack several images into one picture
- 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, iPhone, Android, any web browser | Works everywhere. Covers the Geometry / Format / Filter / Asset Set operations. |
| On this device | The Circuitry app on iPhone and iPad | Runs Resize, Rotate, Flip, Crop, Convert (including HEIC), Strip Metadata, Canny, Threshold and the Detect operations on the device itself, faster and without loading the OpenCV library. Also unlocks the iPhone and iPad operations below. |
| 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. |
| Circuit-accelerated | Browser paired with a Circuit, 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. On iPhone and iPad it uses the device's own engine for every operation it covers; elsewhere the OpenCV operations run in the browser. You can pin the engine to In-browser for predictable behaviour, or Circuit-accelerated to require the higher-quality path.
Operations
Compose
Layers stacks every image wired into the node into one picture — the kind of compositing you would otherwise do in a photo editor. Remove the background from a photo with the Vision node, then drop the cut-out onto a new background; put a logo in the corner of every product shot; lay a texture over a photo.
- Layer order — the image whose node sits highest on the canvas goes at the back, the lowest goes in front. In the config panel the layers are listed front first; the arrows bring a layer forward or send it backward, and the eye hides it.
- Canvas — the same size as the back layer, a ready-made size (square 1080 × 1080, portrait 1080 × 1350, story 1080 × 1920, wide 1920 × 1080, link preview 1200 × 630) or your own. Pick a background color, or keep it transparent.
- Background image — paste a link or upload a picture to sit behind every layer, filling the canvas or fitted inside it. A single cut-out plus a background image is all a "new background" needs.
- Per layer — size (fill the canvas, fit inside, or original size), position (center, a side or corner, or anywhere), scale, rotation, opacity and blend (normal, multiply, screen, overlay, darken, lighten, soft light, hard light, color dodge, color burn, difference, exclusion).
- Finishing — Shadow puts a soft shadow under a cut-out (softness, strength, offset and color). Soften edges feathers a hard cut-out edge. Match colors nudges the layer's color and brightness toward what is under it, so a subject looks lit by its new scene. Keep transparency is on by default, so a cut-out drops in cleanly; turn it off to use the layer as a solid rectangle.
The result is one image (PNG, keeping any transparency). On iPhone and iPad, Layers runs on the device.
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.
iPhone and iPad
These operations appear in the list only in the Circuitry app on iPhone and iPad, and run entirely on the device — your photos never leave it. Feed them a photo from your library or any upstream image.
| Operation | What it does |
|---|---|
| Find Faces | Counts the faces in a photo and returns where each one is, with an annotated preview. |
| Hide Faces | Blurs, pixelates or blacks out every face — handy before sharing or publishing. |
| Read QR & Barcodes | Reads every QR code and barcode in the picture and returns what each one says. |
| Label Image | Names what is in the picture (dog, beach, food…) with a confidence for each label. Set how many labels and the lowest confidence to keep. |
| Read Photo Details | Returns the date taken, location, camera, lens and exposure as data — for sorting, renaming or mapping photos. |
| Scan Document | Finds the page in a photo, straightens its perspective into a flat scan, and optionally cleans it up like a scanner. |
| Smart Crop | Crops to the part of the photo that draws the eye — tight around the subject, or to a square, portrait, story, photo or wide shape. |
| Straighten | Levels a tilted horizon. |
Opened on the web or desktop, a workflow that uses one of these keeps the operation, but that step only runs on an iPhone or iPad.
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 (Layers uses every incoming edge, one layer each), 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. Put a cut-out on a new background
Image (portrait) ──▶ Vision (Remove Background) ──▶ ImgOps (Layers, background image: beach.jpg)
Vision cuts the person out; Layers puts the beach behind them. Turn on Shadow and set Match colors to about 40% on the cut-out for a natural look. To use a picture from the workflow as the background instead, wire a second Image node into Layers above the cut-out.
2. 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.
3. 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.
4. 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.
5. 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.
6. 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.
7. 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.
8. 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
- Batch File & Image Processing — iterate over a folder of images
- Save Node — write ImgOps output to disk