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

How to change the display size of the image #6

Open
fabioharry opened this issue Jul 28, 2018 · 1 comment
Open

How to change the display size of the image #6

fabioharry opened this issue Jul 28, 2018 · 1 comment

Comments

@fabioharry
Copy link

Hello,

I would like to know how to change the display size of the image without having to change it in ffmpeg?

Is it possible?

Thank you for your project!

@BradRoot
Copy link

BradRoot commented Feb 14, 2019

Try this JavaScript:

height = window.innerHeight;

canvas = document.getElementById('myCanvas'), 
ratio = canvas.width / canvas.height;
width = height * ratio;
canvas.style.width = width + 'px';
canvas.style.height = height + 'px';

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

2 participants