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

Whitespace Trimming Issue #654

Open
joebfdn opened this issue Dec 11, 2024 · 0 comments
Open

Whitespace Trimming Issue #654

joebfdn opened this issue Dec 11, 2024 · 0 comments

Comments

@joebfdn
Copy link

joebfdn commented Dec 11, 2024

We are finally porting some things forward from the legacy Resizer lib to the Imageflow lib. It seems there is something wrong with the Imageflow whitespace trimming when applying percent_padding, or has the behavior intentionally changed? It seems trimming without percent_padding functions the same as before, so seems limited to when percent_padding is included. Below are 3 samples to illustrate.

It seems as if maybe it's taking the smallest pixel trim side, and subtracting that from the opposite side (i.e. if short side is X sub from Y) and then preserving the original smallest side? Sorry hard to explain, samples should show it well though.

Original Image:
https://images.furnituredealer.net/b/p/a1e18853-5f6b-4575-b42b-6c376b416583/assets/c3803df15d5d474096ad748fe4731b7d.jpg

Legacy Resizer with trim and padding:
https://imageresizer4.furnituredealer.net/img/remote/images.furnituredealer.net/b/p/a1e18853-5f6b-4575-b42b-6c376b416583/assets/c3803df15d5d474096ad748fe4731b7d.jpg?format=webp&quality=85&width=450&height=450&scale=both&trim.threshold=20&trim.percentpadding=0.5

Imageflow with trim and padding:
https://imageresizer.furnituredealer.net/img/remote/images.furnituredealer.net/b/p/a1e18853-5f6b-4575-b42b-6c376b416583/assets/c3803df15d5d474096ad748fe4731b7d.jpg?format=webp&quality=85&width=450&height=450&scale=both&trim.threshold=20&trim.percentpadding=0.5

Imageflow with trim and NO padding:
https://imageresizer.furnituredealer.net/img/remote/images.furnituredealer.net/b/p/a1e18853-5f6b-4575-b42b-6c376b416583/assets/c3803df15d5d474096ad748fe4731b7d.jpg?format=webp&quality=85&width=450&height=450&scale=both&trim.threshold=20

Imageflow with trim and NO width/height params:
https://imageresizer.furnituredealer.net/img/remote/images.furnituredealer.net/b/p/a1e18853-5f6b-4575-b42b-6c376b416583/assets/c3803df15d5d474096ad748fe4731b7d.jpg?format=webp&quality=85&trim.threshold=20&trim.percentpadding=0.5

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

1 participant