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

Add resize_mode option to watermark filter #484

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tobymarsden
Copy link

@tobymarsden tobymarsden commented Sep 26, 2024

I needed the ability to resize a watermark to the full size of the source image, ignoring the watermark's aspect ratio. This PR allows you to do this:

http://localhost:8000/unsafe/0x0:800x500/fit-in/500x0/filters:watermark(https://ucarecdn.com/3ebe2903-f913-4293-9228-2ec723dbb175/,center,center,0,100,100,force)/https://ucarecdn.com/638d660f-3759-494d-9ae3-08eddf68bd49/

Before this change:

image

After this change:

image

@cshum
Copy link
Owner

cshum commented Sep 28, 2024

Thanks for your PR! Would you mind adding a line of test image uri similar to this? https://github.com/cshum/imagor/blob/master/vips/processor_test.go#L159

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