Skip to content

Chore/utility fixes#3

Merged
sn merged 2 commits into
mainfrom
chore/utility-fixes
May 16, 2026
Merged

Chore/utility fixes#3
sn merged 2 commits into
mainfrom
chore/utility-fixes

Conversation

@sn

@sn sn commented May 16, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several new features, improvements, and documentation updates to the image processing library. The most significant changes include the addition of GIF support for batch processing, new security and validation options in the configuration, and enhanced documentation to clarify behaviors and constraints. These updates improve the library’s flexibility, safety, and usability.

New Features

  • Added a .gif() method to BatchImage, allowing users to select GIF as the output format for all images in a batch. (src/nitro_img/batch.py)
  • Added max_pixels (decompression bomb protection) and url_allowed_schemes (restrict allowed URL schemes for from_url) to the global config for enhanced security. (src/nitro_img/config.py) [1] [2] [3]

Documentation Improvements

  • Updated SKILL.md with new and clarified behaviors, including: GIF support in BatchImage, the role of max_output_dimensions, max_pixels, and url_allowed_schemes, and details about how responsive image widths are measured. [1] [2] [3]

API and Usability Enhancements

  • Responsive image generation (responsive and save_responsive) now consistently uses the post-pipeline image as the reference for width calculations, and documentation was updated to reflect this. (src/nitro_img/image.py) [1] [2] [3] [4]
  • Improved error handling and validation: watermark() and text_overlay() now raise ValueError for unknown positions, and strip_metadata() does not preserve animation frames. (src/nitro_img/image.py) [1] [2]

Other Notable Changes

  • Bumped the package version to 1.1.1 and updated the description to better reflect the library’s capabilities. (pyproject.toml, src/nitro_img/__init__.py) [1] [2]
  • Refactored internal code for cleaner initialization and preset handling in the Image class. (src/nitro_img/image.py) [1] [2] [3] [4]

These changes make the library more robust, secure, and user-friendly, while also providing clearer guidance for developers.

@sn sn self-assigned this May 16, 2026
@sn sn merged commit 4f13257 into main May 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant