https://github.com/kamilburda/gimp-image-attribute-export
Export of GIMP image attributes as XML, JSON or YAML
https://github.com/kamilburda/gimp-image-attribute-export
gimp gimp-plugin image-attributes python
Last synced: 6 days ago
JSON representation
Export of GIMP image attributes as XML, JSON or YAML
- Host: GitHub
- URL: https://github.com/kamilburda/gimp-image-attribute-export
- Owner: kamilburda
- License: bsd-3-clause
- Created: 2022-11-19T22:27:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-04-07T13:25:31.000Z (3 months ago)
- Last Synced: 2026-04-07T15:26:02.802Z (3 months ago)
- Topics: gimp, gimp-plugin, image-attributes, python
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Attribute Export Plug-in for GIMP
This [GIMP](https://www.gimp.org/) plug-in exports various attributes from the specified image into an XML, JSON or YAML file. Attributes include (among many others) image name, width, height, a list of layers, layer effects, channels, paths and their attributes (width, height, offsets, visibility, color tags, ...).
[**Download latest release**](https://github.com/kamilburda/gimp-image-attribute-export/releases)
## Installation
GIMP 3.0.0 or later is required.
1. In GIMP, locate the folder containing GIMP plug-ins - open GIMP and go to Edit → Preferences → Folders → Plug-Ins. If you cannot locate any of the folders on your system, you can add a custom folder.
2. Copy the `image-attribute-export` folder inside one of the folders identified in step 1. The folder hierarchy should look like this:
```
plug-ins/
...other plug-in folders...
image-attribute-export/
image-attribute-export.py
procedure.py
```
For Windows, make sure you have GIMP installed with support for Python plug-ins.
## Usage
Simply export an image like you normally would (`File → Export...`) and replace the file extension at the top of the export dialog with `xml`, `json`, or `yaml`. Alternatively, you may select one of these file extensions at the bottom of the export dialog.
To export the attributes programmatically (e.g. from the Python-Fu Console), the file export procedures are `file-xml-export`, `file-json-export` and `file-yaml-export`.
## Example of image attributes in the JSON format
Only a select few entries are shown for brevity.
```
{
"image": {
"name": "loading_screen_template.xcf",
"width": 1024,
"height": 512,
...
"layers": [
{
...
"name": "Frames",
"visible": True,
"width": 688,
"height": 386,
"opacity": 100.0,
"offsets": [
168,
30
],
...
"children": [
{
...
"name": "top-frame",
...
},
{
...
"name": "bottom-frame",
...
}
]
},
{
...
"name": "main-background",
...
}
],
"channels": [],
"paths": []
}
}
```
## License
This plug-in is licensed under the [BSD 3-Clause](LICENSE) license.