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

Rendering images on high-density/retina displays #1036

Closed
captbaritone opened this issue Sep 10, 2021 · 1 comment
Closed

Rendering images on high-density/retina displays #1036

captbaritone opened this issue Sep 10, 2021 · 1 comment

Comments

@captbaritone
Copy link

I'm experimenting with an app that builds its UI out of raster sprites using iced::widget::image::Image. On high density displays (such as a macbook pro) this results in blurry looking UI because my image ends up getting upscaled, presumably using an algorithm that's optimized for photos and not pixel art. Is there some way to control how this scaling is performed? Or perhaps a way to detect the current display's pixel density and a way to define an image which is given in screen pixels and not display pixels? In that world, I could do the upscaling myself.

For context, in the browser, this problem can be addressed using the image-rendering CSS property.

You can zoom into this image to see the blur:

Screen Shot 2021-09-10 at 9 53 27 AM

@hecrj
Copy link
Member

hecrj commented Jan 22, 2022

Closing in favor #557.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants