GifEditor¶
- class easy_pil.gif_editor.GifEditor(image: str | BytesIO | Path | GifImageFile)¶
Editor for GIF images, applying operations lazily across all frames.
Operations are not applied eagerly. Instead every call to an
Editormethod is queued and only replayed against one decoded frame at a time when the GIF is rendered (save/image_bytes). This keeps memory usage bounded to a single decoded frame rather than retaining every frame as a full RGBA image for the object’s lifetime.- close() None¶
Close the source image and drop the queued operations.
- property image_bytes: BytesIO¶
Return image bytes.
- Returns:
Bytes from the image of Editor
- Return type:
BytesIO
- save(fp: str | Path | BytesIO, **kwargs: Any) None¶
Save the image.
- Parameters:
fp (str | Path | BytesIO) – File path or buffer
**kwargs – Additional arguments passed to PIL save