MCDE dtphoto: the Image and Filter menus carry real operations
Image: Invert, Desaturate, Brightness/Contrast, Flip horizontal/vertical,
Rotate 180/90 CW/90 CCW, Image Size and Canvas Size. Filter: Blur,
Blur More, Sharpen, Sharpen More, Find Edges, Emboss, Solarize, Add Noise,
Median/Despeckle, Mosaic. All of them read and write through the same RGB
buffer, so no operation costs an X round trip per pixel.
Two bugs found while wiring them:
- A per-pixel correction ignored the selection. Invert, Desaturate,
Brightness and Solarize changed the whole picture even with a mask.
They now share OpPerPixel, so a new operation cannot forget the mask.
- A menu entry was bound by its label, but the reference has "Horizontal"
in Image > Flip and in Layer > Type. CommandOf takes the full path now
("Image/Flip/Horizontal"), the reader stores it in Item.path.
Verified, depth 24 and depth 8, 16 runs, 0 red:
- -menutest: 31 paths each resolve to the command the callback switches
on; an unknown path stays CMD_NONE.
- -optest against the arithmetic, not "the picture changed": a hard edge
blurred to 170 (six of nine window pixels white), the same edge
sharpened clamped to 255 and 0, mosaic cells to their mean (100,30,128),
noise deterministic and inside the range, mask inside changed and
outside untouched.
- -selftest on a 1024x768 24-bit BMP: byte-identical (2,359,350 bytes,
0 differing).
- -retouchtest -selecttest -movetest -croptest -typetest still green.
- DTPHOTO_CMDS=1 reports 37 bound entries, the 11 Filter paths among them.
This commit is contained in:
1 parent
30ff8ec5f5
commit
028161f296
3 files changed
+1281
-33
No files matched your search
+24
-2
@@ -450,8 +450,30 @@ unberuehrt), `-retouchtest` (alle sechs Werkzeuge in der erwarteten
|
||||
Richtung), `-selftest` -- alle gruen auf Tiefe 24 und Tiefe 8.
|
||||
Per Maus belegt: Zoom 200% -> 400% -> 200%, Crop 1024x768 -> 200x150,
|
||||
Move mit zwei Bewegungen (50,30 und 90,60) und 11.244 geaenderten Pixeln.
|
||||
Offen: Verlauf, Optionsleiste, PNG/TIFF/PSD, Aktionen der Untermenues,
|
||||
P3-P6.
|
||||
|
||||
Stand 2026-11-22 (Bild- und Filtermenue): Image > Adjust (Invert,
|
||||
Desaturate, Brightness/Contrast), Flip (horizontal/vertikal), Rotate (180,
|
||||
90 CW, 90 CCW - letzteres tauscht die Dokumentgroesse), Image Size
|
||||
(nearest neighbour, Seitenverhaeltnis aus der Breite) und Canvas Size (Bild
|
||||
zentriert, Rand in der Hintergrundfarbe). Filter > Blur/Sharpen sind
|
||||
3x3-Faltungen (Blur More ein Gauss-Kern, Sharpen More der starke
|
||||
Laplace), Stylize hat Find Edges, Emboss und Solarize, Noise hat Add Noise
|
||||
(Xorshift-Seed, gleicher Lauf = gleiche Bytes) und Median/Despeckle,
|
||||
Pixelate hat Mosaic. Randpixel behalten ihren Wert (ein 3x3-Fenster am
|
||||
Rand griffe aus dem Bild), und jede Pixeloperation beachtet die Auswahl --
|
||||
die ersten vier (Invert, Desaturate, Brightness, Solarize) taten es nicht,
|
||||
deshalb laufen sie jetzt ueber `OpPerPixel`, damit eine neue Operation die
|
||||
Maske nicht vergessen kann.
|
||||
Ein Menueeintrag wird ueber seinen vollen Pfad gebunden, nicht ueber das
|
||||
Label: die Referenz hat "Horizontal" in Image > Flip und in Layer > Type.
|
||||
Belegt ohne Display: `-menutest` (31 Pfade, jeder loest auf den Befehl auf,
|
||||
den der Callback schaltet) und `-optest` gegen die Arithmetik, nicht gegen
|
||||
"das Bild hat sich geaendert" -- eine harte Kante wird zu 170
|
||||
weichgezeichnet, dieselbe Kante zu 255 bzw. 0 geschaerft, eine
|
||||
Mosaic-Zelle zu ihrem Mittelwert. Alle acht Tests gruen auf Tiefe 24 und
|
||||
Tiefe 8, `-selftest` byte-identisch (2.359.350 Bytes, 0 Abweichungen).
|
||||
Offen: Verlauf, Optionsleiste, PNG/TIFF/PSD, Distort/Noise-Render,
|
||||
Effekte-Ebene, P3-P6.
|
||||
|
||||
### C2. dtillustrator -- Illustrator 5.5.1, exakter Nachbau
|
||||
|
||||
|
||||
@@ -103,6 +103,32 @@ narratives and test notes, is `docs/reference/mcde-agents-history-2026-11-13.txt
|
||||
and depth 8. Retouching reads a patch around the dab through one
|
||||
GetImageRGB round trip, not one per pixel; measured 80 ms for a full
|
||||
1024x768 open/save round trip on a busy host.
|
||||
The Image and Filter menus carry real operations since 2026-11-22, all
|
||||
through the same RGB buffer: Image > Adjust (Invert, Desaturate,
|
||||
Brightness/Contrast), Flip (horizontal, vertical), Rotate (180, 90 CW,
|
||||
90 CCW, which swaps the document size), Image Size (nearest neighbour,
|
||||
the aspect kept from the width) and Canvas Size (the picture centred in
|
||||
the larger canvas, the border in the background colour). Filter >
|
||||
Blur/Sharpen are 3x3 convolutions (Blur More a gaussian-ish kernel,
|
||||
Sharpen More the strong laplacian), Stylize has Find Edges, Emboss and
|
||||
Solarize, Noise has Add Noise (a xorshift seed, so the same run gives
|
||||
the same bytes) and Median/Despeckle, Pixelate has Mosaic. The border
|
||||
pixels keep what they had -- a 3x3 window at the edge would fold
|
||||
outside the picture -- and every per-pixel operation honours the
|
||||
selection: the first four (invert, desaturate, brightness, solarize)
|
||||
did not, which is why they now share `OpPerPixel` and a new operation
|
||||
cannot forget the mask.
|
||||
A menu entry is bound by its full path, not its label: the reference
|
||||
has "Horizontal" in Image > Flip and in Layer > Type, and the label
|
||||
alone cannot tell them apart. `CommandOf` takes "menu/sub/item", the
|
||||
reader stores it in `Item.path`, and `-menutest` proves every path
|
||||
resolves to the command the callback switches on (31 paths, measured
|
||||
2026-11-22). `DTPHOTO_CMDS=1` prints what the loaded menu file bound.
|
||||
`dtphoto -optest|-menutest` are headless too: the operations are checked
|
||||
against the arithmetic (a hard edge blurred to 170, the same edge
|
||||
sharpened clamped to 255 and 0, a mosaic cell to its mean) and not
|
||||
against "the picture changed". All eight run green on depth 24 and
|
||||
depth 8.
|
||||
The zoom magnifier doubles on the left button and halves on the right
|
||||
(12%-800%), the hand pans the view, and both say what they did on
|
||||
stderr so a mouse-driven test can read the result.
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user