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

Add option to Image class to ignore embedded DPI resolution when rendering #5362

Open
mike-ward opened this issue Sep 21, 2021 · 4 comments
Open

Comments

@mike-ward
Copy link

mike-ward commented Sep 21, 2021

Images with embedded DPI resolution (DPIx, DPIy) render smaller/larger than desired when the image control container is unbounded. A property to control this behavior would be much appreciated.

Example:

<Image 
    Source="{Binding HttpSource}"
    IgnoreEmbeddedDPI="True" />
@lindexi
Copy link
Contributor

lindexi commented Sep 23, 2021

How about make it as the attache property?

@mike-ward
Copy link
Author

mike-ward commented Sep 23, 2021

What I really would like is to not have to even consider it. Here's an image rendered in WPF (Stretch=Uniform, StretchDireciton=downonly)

image

And here's a same thing using AvaloniaUI with same stretch properties.

image

Avalonia's behavior is the one I want.

Image link: https://pbs.twimg.com/media/E_HukwdXoAQJACf.jpg

@miloush
Copy link
Contributor

miloush commented Oct 14, 2021

I would say images with embedded DPI information render as they instruct to do so (and file a bug on AvaloniaUI for ignoring it). If you want special treatment like ignoring DPI, color profile or orientation, you should do the extra work.

@mike-ward
Copy link
Author

mike-ward commented Oct 14, 2021

@miloush I would say otherwise. The aspect ratio of the image is wrong and the image looks terrible. And for the record, I did do the extra work and still ran into to issues which is what prompted this bug report. Finally, I would like to thank you for your supportive and encouraging comments. It's kind and thoughtful comments like yours that keep the community open and welcoming.

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

5 participants