Gimpformats Index / Gimpformats / Gimpgbrbrush
Auto-generated documentation for gimpformats.GimpGbrBrush module.
Show source in GimpGbrBrush.py:16
Pure python implementation of the gimp gbr brush format.
See: https://gitlab.gnome.org/GNOME/gimp/blob/master/devel-docs/gbr.txt
class GimpGbrBrush:
def __init__(self, fileName: str | None = None) -> None: ...
Show source in GimpGbrBrush.py:149
Get a textual representation of this object.
def __repr__(self, indent: int = 0) -> str: ...
Show source in GimpGbrBrush.py:145
Get a textual representation of this object.
def __str__(self) -> str: ...
Show source in GimpGbrBrush.py:53
Decode a byte buffer.
data
bytes - data buffer to decodeindex
int, optional - index within the buffer to start at. Defaults to 0.
RuntimeError
- "unknown brush version"RuntimeError
- "File format error. Magic value mismatch"
int
- offset]
def decode(self, data: bytes, index: int = 0) -> int: ...
Show source in GimpGbrBrush.py:96
Encode this object to byte array.
def encode(self) -> bytearray: ...
Show source in GimpGbrBrush.py:115
Get a final, compiled image.
@property
def image(self) -> PIL.Image.Image | None: ...
Show source in GimpGbrBrush.py:45
Load a gimp file.
fileName
- can be a file name or a file-like object
def load(self, fileName: BytesIO | str) -> None: ...
Show source in GimpGbrBrush.py:122
Save this GIMP image to a file.
filename
str - The name of the file to save.extension
str, optional - The extension of the file. If not provided, it will be inferred from the filename.
def save(self, filename: str, extension: str | None = None) -> None: ...
Show source in GimpGbrBrush.py:110
Get the size.
@property
def size(self) -> tuple[int, int]: ...