The Filter Gallery's effects, six missing classics, and five more Neural Filters - #67
Merged
Conversation
Both of the Neural Filters that do not run a network here are real Photoshop Neural Filters -- Skin Smoothing is Adobe's featured one and Colour Transfer is in their beta list -- so the menu is right, but the claim that Colour Transfer "has no model and is not missing one" was too comfortable. Photoshop's takes the palette from a reference photograph and matches it scene to scene; this one aims at a hue. The arithmetic that moves one colour distribution onto another is all here. What is missing is the picture to take the distribution from, and the reason it is missing is that a filter is handed one buffer and a list of numbers with nowhere for a second image to arrive. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…eural Filters Fifty-eight filters, taking the set from 57 to 115 across fourteen categories, and closing the three gaps in the Filter menu that were actually visible: the Gallery had nothing of its own in it, six ordinary Photoshop filters were missing, and seven of Adobe's Neural Filters had no counterpart at all. **The Filter Gallery, forty-six effects.** Artistic (15), Brush Strokes (8), Sketch (14), Texture (6) and the three Distort effects Adobe keeps in the Gallery rather than the menu. Until now the Gallery was a stacker with nothing to stack but the filters already in the menu; these are what people open it for. They are registered as ordinary filters, so each also appears in its own menu group -- which is what Photoshop does with "Show all Filter Gallery groups and names" turned on. Every one is written from what the effect does to an image rather than from anyone's source, and they share four ideas: flatten a picture into regions a brush could have painted, smear a plane along a line, light a plane as though it were a surface, and generate the surface rather than ship a texture file. `util.rs` grew those four and the Gallery is mostly their arrangement. **Six classics.** Blur, Blur More and Sharpen More (fixed-radius, no dialog, exactly as they have been since 1990), Custom (the 5x5 kernel editor, opening at the identity), HSB/HSL (channels as hue, saturation and brightness, both directions) and Lighting Effects (Phong shading with the image's own luminance as the bump map). The filter dialog scrolls now, because Custom declares twenty-seven parameters. **Five Neural Filters**: Harmonization, Landscape Mixer, Photo Restoration, Photo to Sketch and Face to Caricature. Nine of the twelve now run a network. Three of those need a second picture, which a filter has never been able to be handed. `FilterPlugin::wants_backdrop` is the answer: the host composites what is under the layer and passes it to `apply_over`, so Harmonization matches a cut-out to its background the way Photoshop's does, Landscape Mixer transfers a palette band by band through the depth model, and Colour Transfer finally has a reference image rather than a hue slider -- which is the gap the last commit admitted to. Photo Restoration composes what this build already has: a median that only fires on damage, an edge-preserving denoise, the deblocking and detail models, and a tone stretch. Face to Caricature warps from the detector's box and the proportions a face has when it is looking at the camera; it does not find your features and says so. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifty-eight filters: 57 → 115, across fourteen categories. This closes the three gaps from the last message's inventory.
Stacks on #66 — that commit is in this branch, and the README paragraph it fixed is rewritten again here, so merging this makes #66 redundant.
The Filter Gallery — 46 effects
The Gallery was a stacker with nothing of its own to stack: it listed the filters already in the menu. These are what people open it for.
They are registered as ordinary filters, so each appears in its own menu group as well — which is what Photoshop does with Show all Filter Gallery groups and names on — and can be stacked in the Gallery as before.
None of these are anyone's source. They are written from what each effect does to an image, and they share four ideas that now live in
util.rs: flatten a picture into regions a brush could have painted, smear a plane along a line (that one is the Brush Strokes group), light a plane as though it were a surface (Bas Relief, Chrome, Note Paper, Plaster, Texturizer), and generate the canvas/sandstone/burlap/brick surfaces rather than ship texture files that could go missing.One deliberate deviation: Photoshop's Sketch group draws in the foreground and background colours, and a filter here never sees the toolbox, so they draw black on white — which is what those swatches are set to by default and what every one of these effects is pictured with.
Six classics
Blur, Blur More, Sharpen More (fixed radius, no dialog, as they have been since 1990), Custom (the 5×5 kernel editor, opening at the identity — so it joins Offset and Camera Raw on the list of filters that legitimately do nothing at their defaults), HSB/HSL (channels as hue/saturation/brightness, both directions) and Lighting Effects (Phong shading, with the image's own luminance as the bump map, which is what makes it look embossed rather than merely brightened).
The filter dialog scrolls now, because Custom declares twenty-seven parameters.
Five Neural Filters — nine of twelve now run a network
Harmonization, Landscape Mixer, Photo Restoration, Photo to Sketch, Face to Caricature.
Three of these need a second picture, which a filter has never been able to be handed.
FilterPlugin::wants_backdrop()is the answer: the host composites what is under the layer — hiding the layer and everything above it, compositing, putting the visibility back — and passes it toapply_over. So:Photo Restoration composes what this build already ships: a median that only fires where a pixel disagrees with its neighbours (a scratch, not an edge), an edge-preserving denoise, the deblocking and detail models, then a tone stretch. Face to Caricature warps from the detector's box plus the proportions a face has when it is looking at the camera — it does not find your features, and the docs say so.
Harmonization, Landscape Mixer and Face to Caricature do nothing without a layer underneath or a face in the picture, and are on the test's expected-no-op list for exactly that reason.
Checked
🤖 Generated with Claude Code