LineScreen | GlitchNodes
Halftone line screens without the print math
- image
- image
LineScreen converts an image into a halftone-ish line pattern - the kind of engraved-lines look you associate with old newspaper photos and banknotes. It's one of the quieter nodes in GlitchNodes, but it's also one of the most reliable: no randomness, no fragile file I/O, just a clean, mechanical effect with a satisfying print-shop feel. Reach for it when you want a poster treatment or a stylistic break from all the noise-based glitch stuff.
Mechanically it's simple and robust. The node builds a repeating line pattern (via Pillow's ImageDraw) at a given angle and line_spacing, then applies it to the image using a brightness threshold: areas below the threshold show the line pattern, and contrast_boost sharpens the decision before it's made. You control the two colors directly - line_color_r/g/b (default black) and bg_color_r/g/b (default white) - so the whole thing is a two-color screened engraving. invert flips which areas get the lines.
The inputs that matter
- line_spacing (2–20, default 4) - distance between lines. Low = dense, high = coarse. This is the primary texture knob.
- angle (-90 to 90, default -45) - the line direction. -45/45 degrees is the classic halftone; 0 and 90 give horizontal/vertical rulings.
- threshold (0.1–0.9, default 0.5) - brightness cutoff that decides where lines appear. Crank it up and more of the image fills with pattern.
- contrast_boost (1.0–2.0, default 1.2) - punch up the source contrast before screening, which gives crisper line edges.
- invert - flip the pattern/background roles.
- line_color / bg_color (each R/G/B 0–1) - your two-color palette. Two-color design, done.
Output is image (IMAGE) → PreviewImage/SaveImage. Input is named image and it handles batches.
Installing it
Standard GlitchNodes install:
cd ComfyUI/custom_nodes
git clone https://github.com/pxl-pshr/GlitchNodes
# restart ComfyUI
or ComfyUI Manager → Install Custom Nodes → search "GlitchNodes". Deps: numpy, torch, Pillow, opencv-python, scipy. No models, no downloads beyond the pack.
Gotchas
The main beginner trap is expecting the image's own colors to survive - LineScreen reduces everything to two flat colors, so if you pick a black line on white background, your full-color render becomes a black-and-white engraving. That's the design, not a bug; pick your two colors deliberately (a dark magenta line on cream reads especially well). Also, threshold interacts with contrast_boost: if the pattern looks "dusty" or noisy, raise contrast_boost and nudge the threshold rather than fighting the spacing. And as always with this pack, "highly experimental and may break or even error" - though in practice LineScreen is one of the calmest, most predictable nodes here.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| line_spacing | INT | 42–20 | — |
| angle | FLOAT | -45.0-90–90 | — |
| threshold | FLOAT | 0.500.1–0.9 | — |
| contrast_boost | FLOAT | 1.21–2 | — |
| invert | BOOLEAN | false | — |
| line_color_r | FLOAT | 0.000–1 | — |
| line_color_g | FLOAT | 0.000–1 | — |
| line_color_b | FLOAT | 0.000–1 | — |
| bg_color_r | FLOAT | 1.000–1 | — |
| bg_color_g | FLOAT | 1.000–1 | — |
| bg_color_b | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |