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
[frameit] Add force_resize_background option #15618
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Looks interesting @kdo1234 - can you take care of the CLA? |
I'll figure out how to accept the CLA, right not the issue with accepting the CLA is that my github doesn't have a public email address. Do you think the project will accept this pull request? Thank you |
If you can tell me a bit more why this option is useful and when you might want to use it, I am pretty sure we can merge this (CLA required of course). |
@kdo1234 Heyyy 👋 I'm good to merge this if you are able to accept the CLA 😊 |
@kdo1234 One more ping on accepting the CLA 🙏 |
@kdo1234 Attempting to ping you in case you figured it out! ;) |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
This pull request increases developer control on how background images are used for framed screenshots.
Description
This pull request preserves frameit's default behavior in which the background image is resized keeping the aspect ratio if the height of the background image does not equal the height of the screenshot.
This pull request adds a new configuration setting named
force_resize_background
to frameit.If
force_resize_background
is set to true then frameit always resizes the background image ignoring aspect ratio (i.e. regardless of whether the height of the background equals the height of the screenshot).Testing Steps
I ran the existing tests.
I ran frameit locally with the configuration set to true and false and not set, and observed that the resulting framed screenshots were as expected.