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

Handle retina screenshots & other hidpi images sensibly #2985

Closed
ara4n opened this issue Jan 18, 2017 · 3 comments
Closed

Handle retina screenshots & other hidpi images sensibly #2985

ara4n opened this issue Jan 18, 2017 · 3 comments
Labels
P2 S-Tolerable Low/no impact on users T-Defect

Comments

@ara4n
Copy link
Member

ara4n commented Jan 18, 2017

Currently if you take a screenshot from a retina display and upload it into a room, it gets rendered at retina-pixel = native-pixel sizing. Instead it should be rendered at the correct dpi. Github recently fixed themselves to get this right; so should we.

@ara4n ara4n added T-Defect S-Tolerable Low/no impact on users P2 labels Feb 18, 2017
@ara4n
Copy link
Member Author

ara4n commented Jan 6, 2019

This is getting more and more important for experimental, where otherwise the double-size screenshots end up massive on the wider timeline.

@ara4n
Copy link
Member Author

ara4n commented Jan 11, 2019

Looks like https://github.com/hughsk/png-chunks-extract combined with detecting

png:pHYs: x_res=5669, y_res=5669, units=1

is the right way to handle these.
We have to do this on the client before uploading the msg (because E2E), and then halve the width/height described in the metadata if we see it's retina.

ara4n added a commit to matrix-org/matrix-react-sdk that referenced this issue Jan 14, 2019
needs server to support 1600x1200 thumbnails for retina large ones.
ideally need to cap maximum thumbnail size to 800x600 rather than expand to arbitrary widths.
need to check that luke's funky timeline code doesn't get confused between naturalWidth and infoWidth etc.
also need to consider whether to encode a resolution metric in the event rather than lying about resolution.
@ara4n
Copy link
Member Author

ara4n commented May 31, 2019

fixed by matrix-org/matrix-react-sdk#2439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 S-Tolerable Low/no impact on users T-Defect
Projects
None yet
Development

No branches or pull requests

1 participant