fluttercandies / flutter_image_compress

flutter image compress
MIT License
632 stars 215 forks source link

[Feature Request] Resize to exact size while maintaining aspect ratio. #278

Open ua741 opened 8 months ago

ua741 commented 8 months ago

Platforms

Android, iOS

Description

A new method that will take an input image, and take a req height and width as input and return a new image with exact same dims while respecting the aspect ratio.

We will need to add padding if we wish to maintain the aspect ratio, it will be great if we can specify the background color for the padding.

Why

This is helpful for preparing input image for various machine learning model, which expects the input to be of specific size.