Skip to content

Preserve the aspect ratio of a clipped region in an Image#2195

Merged
richard-uk1 merged 1 commit intolinebender:masterfrom
barsae:master
Jul 12, 2022
Merged

Preserve the aspect ratio of a clipped region in an Image#2195
richard-uk1 merged 1 commit intolinebender:masterfrom
barsae:master

Conversation

@barsae
Copy link
Contributor

@barsae barsae commented Jun 3, 2022

Previously, Image always used the full (non-clipped) image for computing
the aspect ratio to maintain for FillStrats like Contain. This could
cause clipped regions to be unexpectedly stretched.

This also adds support to the Image example for clipping.

Previously, Image always used the full (non-clipped) image for computing
the aspect ratio to maintain for FillStrats like Contain.  This could
cause clipped regions to be unexpectedly stretched.

This also adds support to the Image example for clipping.
Copy link
Collaborator

@richard-uk1 richard-uk1 left a comment

Choose a reason for hiding this comment

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

I've looked through this and it looks good. AFAICT preserving aspect ratio in this situation is universally what you would want/expect druid to do.

@richard-uk1 richard-uk1 merged commit bf5d3ac into linebender:master Jul 12, 2022
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