8000 Comparing main@{1day}...main · gimp-mcp/gimp-mcp · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gimp-mcp/gimp-mcp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main@{1day}
Choose a base ref
...
head repository: gimp-mcp/gimp-mcp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 3 commits
  • 3 files changed
  • 4 contributors

Commits on Nov 8, 2026

  1. fix: plugin crash after client-side timeout (#82)

    Serialize plug-in commands with a lock so a client that retries after a
    timeout waits for the running command instead of driving libgimp
    concurrently and crashing the plug-in.
    
    - Plug-in: threading.Lock around execute_command; docstring corrected.
    - Server: socket read timeout raised from 10 s to 300 s for long
      operations; connect() keeps a 10 s timeout so a GIMP that isn't
      listening still fails fast.
    
    Fixes #81
    
    Co-authored-by: tomer <tomerkon@users.noreply.github.com>
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    3 people authored Nov 8, 2026
    Configuration menu
    Copy the full SHA
    df8089a View commit details
    Browse the repository at this point in the history
  2. fix: return sRGB from get_pixel_color instead of linear values (#55)

    Gegl stores colour in linear light, so Gegl.Color.get_rgba() returns linear
    floats. _get_pixel_color scaled those straight by 255, producing linear
    values labelled as sRGB. Painting #ff5733 and reading the same pixel back
    returned #ff1808.
    
    Checked against babl on GIMP 3.2.4, which converts the same colours right:
    
        colour     get_rgba()*255 (old)   R'G'B'A u8 (babl)
        #ff5733    255,  24,   8          255,  87,  51
        #6495ed     32,  76, 215          100, 149, 237
        #28b45a      5, 116,  26           40, 180,  90
        #808080     55,  55,  55          128, 128, 128
    
    The conversion is done with the sRGB transfer function rather than by
    calling babl. babl cannot be reached safely from this module: if it is not
    yet initialised, babl_format() calls babl_fatal() -- "you must call
    babl_init first" -- which aborts the process at the C level and cannot be
    caught from Python. GIMP imports this file during its plug-in scan, before
    that initialisation, so a module-level Babl.format() makes the entire
    plug-in fail to register and disappear from the Tools menu.
    
    The transfer function is exact for 8-bit output: it round-trips all 256
    levels and matches babl on every colour above. It assumes sRGB, so a non-
    sRGB working space would need babl (resolved lazily, from inside a handler);
    the previous code assumed sRGB too, and got it wrong even for that.
    
    Two smaller defects went with it:
    
    - int(rf*255) truncated instead of rounding, losing a level on its own:
      #6495ed came back as (32, 76, 215) where the correct answer is
      (32, 77, 216) before conversion.
    - Nothing clamped, so an out-of-gamut or HDR channel above 1.0 could report
      a value greater than 255.
    
    Alpha is deliberately left out of the transfer function; it is stored
    linearly and takes no gamma encoding.
    
    Fixes #43
    
    Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
    Co-authored-by: tomerkon <tomerkon@users.noreply.github.com>
    3 people authored Nov 8, 2026
    Configuration menu
    Copy the full SHA
    2c133f4 View commit details
    Browse the repository at this point in the history
  3. test: add get_pixel_color sRGB regression test (#84)

    Adds tests/test_pixel_color_srgb.py, which writes known 8-bit sRGB bytes
    into a layer and checks get_pixel_color reports them exactly (including
    alpha). It fails 5/7 against the pre-#55 linear behaviour and passes on
    main. Also documents the tool's return values as 8-bit sRGB.
    
    Follow-up to #55, refs #43.
    tomerkon authored Nov 8, 2026
    Configuration menu
    Copy the full SHA
    b4a75f3 View commit details
    Browse the repository at this point in the history
Loading
0