Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize while preserving aspect ratio to specified dimensions, using fill if necessary #138

Open
slayful opened this issue Jun 25, 2019 · 2 comments

Comments

@slayful
Copy link

slayful commented Jun 25, 2019

I've tried gifsicle on a sample of images and it is working amazing. It's fast, transforms images that other libs can't handle and the results are compatible with webP conversion.

There's however one feature I'm missing, which is resizing to specified dimensions (both width and height) while preserving aspect ratio.
As far as I can tell, existing modes produce images that either preserve aspect ratio and don't exceed the dimensions, satisfying at least one (width or height) of them OR break aspect ratio and fit the dimensions exactly.

Basically what I'm looking for is gifsicle to fill the missing pixels to match the dimensions. Here's an example with a blue fill: https://ibb.co/z5GRnYb

Is this something that could be easily added?

@marcing
Copy link

marcing commented Sep 20, 2019

I'm looking forward to the same feature. It's called resize with padding I believe.

Thank you.

@slayful
Copy link
Author

slayful commented Oct 2, 2019

#144 this should resolve this :)

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

No branches or pull requests

2 participants