Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@paulinek13
Copy link
Contributor

@paulinek13 paulinek13 commented Jul 5, 2025

Description

Related issue: #411

This PR adds a new ImageCompressionConverter class that enables compression of image files to reduce their size while preserving visual quality.

  • Multiple output format support: JPEG, PNG, and WEBP with format-specific compression options
  • Flexible input handling: Supports both local file paths and URLs pointing to images (any format that PIL is able to open)
  • Skips compression for images below a configurable size threshold
  • Optional fallback to original image if compression increases file size
  • Automatic transparency handling when converting to JPEG format (configurable bg color)

Tests and Documentation

Added unit testing and complete docstring documentation for the converter

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! Nice work.
Also, this is PR/issue #1000, how cool is that? 😆

@paulinek13
Copy link
Contributor Author

Very cool! Nice work. Also, this is PR/issue #1000, how cool is that? 😆

It's so cool! It’s awesome to land the #1000 😎

@romanlutz romanlutz self-assigned this Jul 15, 2025
@romanlutz romanlutz merged commit 3697a5e into Azure:main Jul 22, 2025
20 checks passed
@paulinek13 paulinek13 deleted the feat/411/add_image_compression_converter branch November 6, 2025 16:22
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.

2 participants