ethanbrooks5827 / edittextinphoto-masks
Normalized bounding-box and brush-region mask utilities for localized text replacement, screenshot copy updates, and pixel redaction.
Package info
github.com/ethanbrooks5827/edittextinphoto-masks
Language:Go
pkg:composer/ethanbrooks5827/edittextinphoto-masks
v0.1.0
2026-12-03 01:53 UTC
Requires
- php: >=8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Normalized bounding-box and brush-region mask utilities for localized text replacement, screenshot copy updates, and pixel redaction.
Built as a lightweight, zero-dependency reference toolkit for Edit Text in Photo.
Supported Presets
| Preset ID | Ratio / Scale | Guidance |
|---|---|---|
ui-headline |
16:9 |
box-select single headline line with 3px anti-aliasing padding, preserve nav icons |
packaging-label |
4:5 |
brush-select curved coffee pouch text, preserve kraft grain and specular crease |
menu-price-row |
3:4 |
box-select aligned menu price column without touching horizontal divider rules |
date-stamp-fix |
4:3 |
tight box around digital camera date digits, match original amber glow |
privacy-redact |
16:9 |
client-side irreversible pixelation over email, phone, and API token strings |
Quick Usage
JavaScript / TypeScript (NPM & JSR)
import { listPresets, getPreset, buildWorkflowUrl } from 'edittextinphoto-masks'; console.log(listPresets().map((p) => p.id)); console.log(getPreset('ui-headline')); console.log(buildWorkflowUrl());
Python (PyPI)
from edittextinphoto_masks import list_presets, get_preset, build_workflow_url print([p["id"] for p in list_presets()]) print(get_preset("ui-headline")) print(build_workflow_url())
Go (pkg.go.dev)
package main import ( "fmt" pkg "github.com/ethanbrooks5827/edittextinphoto-masks" ) func main() { fmt.Println(pkg.HomepageURL) fmt.Println(len(pkg.ListPresets())) }
Rust (crates.io)
use edittextinphoto_masks::{HOMEPAGE_URL, list_presets, get_preset}; fn main() { println!("{}", HOMEPAGE_URL); assert!(get_preset("ui-headline").is_some()); assert!(!list_presets().is_empty()); }
Reference Pages
License
MIT