New issue
Advanced search Search tips

Issue 740299 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 2
Type: Bug



Sign in to add a comment

No way to view images at 100% in browser on high-DPI Chromebooks

Project Member Reported by derat@chromium.org, Jul 8 2017

Issue description

Google 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?
 
Owner: bsep@chromium.org
Status: Assigned (was: Untriaged)
bsep@, IIRC you fixed one issue in image view mode. Can you take a quick look and see if there is an obvious fix? If you don't have time, please feel free to bounce it back to me.

To look into the image, I use pixlr (https://pixlr.com/editor/), which allow you to zoom in further without causing blurry-ness. (doesn't mean this issue isn't important. Just a better way to check image IMO).

Comment 2 by derat@chromium.org, 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;

Comment 3 by bsep@chromium.org, Aug 23 2017

Cc: bsep@chromium.org
Owner: osh...@chromium.org
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.

Comment 4 by osh...@chromium.org, Aug 23 2017

Labels: OS-Linux OS-Windows
Owner: bsep@chromium.org
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.
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.

Comment 6 by bsep@chromium.org, 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?

Comment 7 by bsep@chromium.org, Aug 24 2017

*dpr is 1.0

Sign in to add a comment