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

preserveAspectRatio bug-fixed #161

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

Conversation

HemendraKhatik
Copy link

Problem

I was trying to build a QR code generator app where users can put their brand logo in the middle of the QR code. Everything was working fine for square images, but rectangle images were not looking as great as they should look.

For square images

For rectangle image

After digging into the code I was able to get the below result

Solution

Removed buggy line

preserveAspectRatio='xMidYMid slice'

removed buggy line preserveAspectRatio='xMidYMid slice'
@HemendraKhatik HemendraKhatik changed the title Update index.js preserveAspectRatio bug-fixed Jun 20, 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.

1 participant