| Age | Commit message (Collapse) | Author |
|
The _save_buffer fix that rejects pre-existence as proof of a
successful save (mtime/size change verification) was already in place.
Add the missing test case (c) for a stale pre-existing regular file at
the destination, which the task requires alongside the directory and
unwritable-destination cases:
/enhancer/export_stale_dest:
(a) writable stale file -> correctly overwritten; assert the new PNG
bytes differ from the stale content (not mere presence).
(b) read-only stale file the saver cannot replace -> export returns
FALSE with a GError; skipped under root (root bypasses file-mode
perms; the directory case in export_real_success covers a
root-safe save failure).
Gated behind gegl_dep.found() (same as the rest of test_enhancer), so
the minimal (gegl=disabled) lane is unaffected. All 7 enhancer subtests
+ the full 24-test suite pass; ASan/LSan clean.
|
|
next to image
Filters are now independent toggles that compose: the active set is a
bitmask (u_enhance_mask) and the enabled GEGL ops are chained in array
order (enhancer_apply_chain / enhancer_export_chain). Press 1-8 to
toggle any preset on/off at any time; 0 / the Original row clears all;
the live preview re-applies the whole stack each time, so you can
add/remove filters in any order. The window title lists the enabled
presets.
The side panel now sits NEXT TO the image (a horizontal content box:
[panel] + image area) instead of over it; in fullscreen it reparents
to an overlay over the image so fullscreen stays full. Enabled rows
are highlighted (.ggaze-enhance-on: accent background, white bold).
enhancer.c: extract _op_for_builtin, add enhancer_apply_chain and
enhancer_export_chain (single-preset apply/export kept for the tests);
_save_buffer factored out (ju0/ku0 fixes unchanged). New
test /enhancer/apply_chain (compose + empty-mask rejection).
|
|
The enhancer module existed (GEGL presets: Auto-fix, Brightness, Contrast,
Saturation, Warm, Cool, Sharpen, Denoise) but was never connected to the
app and GEGL was never initialized. Wire it up:
- app.c: gegl_init() once in GApplication::startup (GEGL-gated).
- enhancer.c: add enhancer_load(GFile) -> GeglBuffer (gegl:load) and
enhancer_buffer_to_texture(GeglBuffer) -> GdkTexture (RGBA8 ->
GdkMemoryTexture) for the live preview bridge.
- enhancer_export: pick the saver from the output extension (jpg/png/webp)
instead of always gegl:jpg-save (ju0 - was writing JPEG bytes into .png);
verify the save actually produced a non-empty newer file instead of
trusting g_file_test(EXISTS) on a pre-existing path (ku0 - false success).
- window.c: win.enhance (a) cycles the active preset and previews it on the
current image (switches to large view, loads via GEGL, applies, shows the
texture); win.enhance-save (s) exports <stem>-enhanced.<ext> with the
active preset, never overwriting the original. Preview resets on
navigation; the title shows the active preset.
- shortcuts.c: a -> win.enhance, s -> win.enhance-save; ? overlay Enhance
group.
- tests: test_enhancer gains load_and_to_texture, export_format (PNG/JPEG
signature checks), export_real_success (ku0 - parent-missing and
pre-existing-directory both return FALSE). LSAN suppressions cover
GEGL's jpg-load plugin leak. test_shortcut full-table updated (25 rows).
Synchronous apply (may briefly block on large images) and a navigate-away
dirty prompt are deliberately out of scope for v1.
|
|
M9 (task wt0): GEGL quick-enhance (optional, feature-gated).
- src/enhancer.{c,h}: 8 built-in presets (Auto-fix, Brightness, Contrast,
Saturation, Warm, Cool, Sharpen, Denoise) using gegl:stretch-contrast,
gegl:exposure, gegl:brightness-contrast, gegl:saturation, gegl:color-enhance,
gegl:unsharp-mask, gegl:noise-reduction. enhancer_apply via buffer-source +
buffer-sink pipeline; enhancer_export via gegl:jpg-save. User graph presets
deferred (NOT_SUPPORTED in v1).
- meson: gegl_dep conditional (-DHAVE_GEGL); enhancer.c in libggae.
- tests: unit test_enhancer (presets dims+non-zero, export file written).
LSAN suppressions for GEGL third-party init/node leaks.
- 20/20 green, ASan clean (with GEGL lib suppressions).
|