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

incorrect stylized image when the screen resolution isn't 1920x1080 #20

Open
zssloth opened this issue Jan 14, 2019 · 2 comments
Open

Comments

@zssloth
Copy link

zssloth commented Jan 14, 2019

Hi, I tested the style transfer result in the demo website and found that I could not get correct stylized image when the screen resolution isn't 1920x1080. For example, when the screen resolution is 2160x1440, the generated image looks like this:
screen
while it works for another computer with 1920x1080 resolution. Are there any possible reasons about this issue?

@skanel
Copy link

skanel commented Nov 24, 2019

but that is also a style. it is artist

@geni94
Copy link

geni94 commented Sep 21, 2020

There are multiple ways to do this. The easiest and most straightforward one, would be to set a height and width to the final canvas or image element (depending on what you're using). For instance, doing canvas.height = 1920 after you've drawn the image to it, should work as expected. In the case of a <img />, setting one of the attributes statically (say, <img height="1920" {...} /> will set the desired height and adjust the width proportionally. Alternatively, you can set both of them statically.

The model will render the resolution of the container image, i.e. the first image selected by the User, and not the one used for "styling", so unless you've forced some custom width/height beforehand, it should render the resolution appropriately.

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

3 participants