No way to view images at 100% in browser on high-DPI Chromebooks |
|||
Issue descriptionGoogle Chrome 58.0.3029.140 (Official Build) (32-bit) Platform 9334.72.0 (Official Build) stable-channel kevin 1. Take a screenshot on a high-DPI Chromebook. 2. Try to view that screenshot at its native resolution. When I browse to file:///home/chronos/user/Downloads and click the screenshot, it's initially scaled down to fit in the browser tab. When I click it, instead of getting it at 100%, it's upscaled (maybe to 200%?) and blurry. On a non-high-DPI Chromebook, or a non-high-DPI Linux desktop, Chrome displays the image at its native resolution after I click it. This happens regardless of whether I took the screenshot on the high-DPI Chromebook or on a low-DPI Linux desktop. When I view a 939x604 PNG on this kevin device, it's always upscaled and blurry, and there doesn't seem to be any way to convince Chrome to zoom out to 100% -- clicking on the image does nothing. This drives me crazy, particularly when I'm trying to look at screenshots attached to bug reports. Users say "my fonts look funny", and I can't tell if the fonts are blurry because that's how we rendered them, or if they're blurry because we're interpolating the image to show it at 200%. :-( Is this intentional?
,
Jul 8 2017
Pixlr requires Flash (it's refusing to run on my Chromebook), so you're probably going to need to find a new app soon. :-)
Point taken that it's possible to use or write a third-party app to handle this, though. Here's a bookmarklet that I just wrote to display the first image on the page at its native resolution, in fact:
javascript:i=document.getElementsByTagName('img')[0];r=window.devicePixelRatio;i.width=i.naturalWidth/r;i.height=i.naturalHeight/r;
,
Aug 23 2017
Sorry, I missed this earlier. I'm not actually sure how to test this; I don't have a HiDPI Chromebook. Can you just zoom out so your devicePixelRatio is 1.0? That is, if you're at 200% hidpi, zoom out to 50%? If there's no zoom level that does that, we should probably add it.
,
Aug 23 2017
This isn't specific to chrome. You should be able to reproduce the same behavior on Windows. I believe you fixed so that the image fits the width, but we didn't fix the scenario to show the original image.
,
Aug 24 2017
If a chromebook would be helpful for debugging we should be able to get one for you, but as oshima@ says this is platform agnostic.
,
Aug 24 2017
Okay yeah, this is intentional. Images are scaled up on every other webpage, so we do it here too. I think that's what people expect it to do. If you want to view it at 1:1 pixels, just zoom out until your dpr is 0. The high-dpi should cancel out and it won't be scaled at all (i.e. we don't scale up and then back down). Now if we're shipping a Chromebook with a default HiDPI setting that doesn't have the inverse as a zoom preset, that's a problem. For Windows I made sure all the popular settings had an inverse (125% -> 80%, 150% -> 67%, 200% -> 50%). It's a bit impractical to give every setting an inverse though, maybe we should let users add a preset?
,
Aug 24 2017
*dpr is 1.0 |
|||
►
Sign in to add a comment |
|||
Comment 1 by osh...@chromium.org
, Jul 8 2017Status: Assigned (was: Untriaged)