{"id":27837,"library":"gimpformats","title":"gimpformats","description":"Pure Python implementation of image file formats used by GIMP. Supports XCF (GIMP native), GPL (palette), GGR (gradient), GIH (brush), VBR (brush), PAT (pattern), and other formats. Current version: 2025. Released annually.","status":"active","version":"2025","language":"python","source_language":"en","source_url":"https://github.com/FHPythonUtils/GimpFormats","tags":["gimp","xcf","image","graphics","file-format"],"install":[{"cmd":"pip install gimpformats","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"GimpImage is a module, not directly in package root","wrong":"from gimpformats import GimpImage","symbol":"GimpImage","correct":"from gimpformats.GimpImage import GimpImage"},{"note":"","wrong":"","symbol":"GimpPalette","correct":"from gimpformats.gimpPalette import GimpPalette"},{"note":"","wrong":"","symbol":"GimpGradient","correct":"from gimpformats.gimpGradient import GimpGradient"},{"note":"","wrong":"","symbol":"GimpBrush","correct":"from gimpformats.gimpBrush import GimpBrush"},{"note":"","wrong":"","symbol":"GimpPattern","correct":"from gimpformats.gimpPattern import GimpPattern"}],"quickstart":{"code":"from gimpformats.GimpImage import GimpImage\nimg = GimpImage.fromPath('image.xcf')\nfor layer in img.layers:\n    print(layer.name, layer.width, layer.height)","lang":"python","description":"Open an XCF file and list layer names and dimensions."},"warnings":[{"fix":"If you need XCF writing, consider using newer versions (if/when available) or alternative libraries.","message":"As of version 2025, XCF writing is not yet implemented. Only reading is supported.","severity":"gotcha","affected_versions":">=2025"},{"fix":"Install Pillow via `pip install Pillow`.","message":"Layer data is stored as PIL/Pillow images. Ensure Pillow is installed for full functionality.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `from gimpformats.GimpImage import GimpImage` (note uppercase 'G' and 'I' in submodule).","cause":"Importing directly from the package instead of from the submodule.","error":"AttributeError: module 'gimpformats' has no attribute 'GimpImage'"},{"fix":"Use `GimpImage.fromPath('image.xcf')` (class method).","cause":"Calling `fromPath` as an instance method instead of class method.","error":"TypeError: fromPath() missing 1 required positional argument: 'path'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}