Repository navigation
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
- GIMP Version: 3.2.6
- OS: Windows 10/11 (x64)
- Plugin:
gimp-mcp-plugin.py(main)
Summary
While running a full 79-tool verification against GIMP 3.2.6, 6 tools failed with AttributeError due to GIMP 2.x / early 3.0 remnants, and _export_to_path silently exported PNG data for JPEG/WebP/TIFF files.
1. export_sprite_sheet: type object 'ImageBaseType' has no attribute 'RGBA'
- Location:
gimp-mcp-plugin.py(line ~3672 in_export_sprite_sheet) - Cause:
Gimp.ImageBaseTypeonly definesRGB,GRAY, andINDEXED. Alpha belongs toGimp.ImageType.RGBA_IMAGEon the layer. Also, callingself._export_to_path(sheet, output_path, "png", 95, True)withflatten=Truestrips the transparent background of the sprite sheet. - Fix:
sheet = Gimp.Image.new(sheet_w, sheet_h, Gimp.ImageBaseType.RGB)
# ...
self._export_to_path(sheet, output_path, "png", 95, False)2. edit_text: type object 'Unit' has no attribute 'PIXEL' & GimpFont type mismatch
- Location:
gimp-mcp-plugin.py(line ~3169 & ~3177 in_edit_text) - Cause:
- In GIMP 3.2 PyGObject, pixel unit is retrieved via
Gimp.Unit.pixel()(as already used in_create_text_layer_nativeon line 3033), notGimp.Unit.PIXEL. gimp-text-layer-set-fontexpects aGimp.Fontobject (resolved viaself._resolve_font(new_font)), not a raw string.
- In GIMP 3.2 PyGObject, pixel unit is retrieved via
- Fix: Use
Gimp.Unit.pixel()andself._resolve_font(new_font)(or calllayer.set_text(),layer.set_font(),layer.set_font_size(),layer.set_color()directly onGimp.TextLayer).
3. set_active_image & close_image: 'gi.repository.Gimp' object has no attribute 'get_displays'
- Location:
gimp-mcp-plugin.py(lines ~3800 and ~3908) - Cause: Both
Gimp.get_displays()anddisplay.get_image()were removed fromlibgimpin GIMP 3.2. Additionally, callingimage.delete()fails while aGimp.Displayis still attached to the image, whereasGimp.Display.delete(display)closes both the display and the underlying image. - Fix: Track the
display.get_id()returned byGimp.Display.new(image)in_new_canvasand_open_image(self._image_displays[image.get_id()] = display.get_id()), or enumerate valid displays viaGimp.Display.get_by_id(i).
4. undo & redo: 'Image' object has no attribute 'undo' / 'redo'
- Location:
gimp-mcp-plugin.py(lines ~3822 and ~3839) - Cause:
Gimp.Image.undo()andGimp.Image.redo()are not exposed in GIMP 3.2'slibgimpbindings or PDB (onlyundo_group_start/end,undo_freeze/thaw,undo_enable/disableexist).
5. _export_to_path & export_web_optimized: Always exports PNG even when format is jpeg, webp, or tiff
- Location:
gimp-mcp-plugin.py(line ~1561 in_export_to_path) - Cause:
_export_to_pathlooks upfile-jpeg-save,file-webp-save, andfile-tiff-save. In GIMP 3.2, these PDB procedures were renamed tofile-jpeg-export,file-webp-export, andfile-tiff-export. Becauselookup_procedure("file-jpeg-save")returnsNone,_export_to_pathfalls back tofile-png-exportand writes PNG bytes into.jpgfiles (causingexport_web_optimizedto report identical sizes for.jpgand.png). - Fix: Look up
file-<fmt>-exportfirst, falling back tofile-<fmt>-save.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity