Image viewer doesn't offer a native zoom level unless layout.css.devPixelsPerPx is set to 1.0, which makes the entire interface tiny.
I was asked to squeeze my question into one sentence, so there it is. Image viewer doesn't offer a native zoom level unless layout.css.devPixelsPerPx is set to 1.0, which makes the entire interface tiny.
The devPixelsPerPx is -1.0 by default, which causes firefox to scale with the OS setting, which is perfectly fine. The problem is that it also causes opened image files, and more importantly the offered zoom level, to also scale the same as the UI. One zoom level is fit to screen, the other is native. (One is a magnifying glass with a "+", the other a "-".) Or rather, the other *should* be native, but in practice it is not native, instead it is scaled by the OS setting, making it as arbitrary and blurry as any other zoom level, which defeats the entire point and makes it impossible to access a native scaling in any reasonable way.
Isisombululo esikhethiwe
If you're in the mood to experiment, here's something you can try, a bookmarklet that inserts a "Native" button into the page. It takes into account your current "net" zoom level and shrinks the image to natural dimensions.
(1) Select and copy the following script:
javascript:var btn=document.createElement('button'); btn.style.cssFloat='right'; btn.appendChild(document.createTextNode('Native')); document.body.insertBefore(btn, document.body.firstChild); btn.addEventListener('click', function(){var img=document.querySelector('img');img.style.transform='scale('+(1/window.devicePixelRatio)+')';}, false); void 0;
(2) Right-click a spot on your Bookmarks Toolbar or, if you do not display that bar, click the Bookmarks menu button and right-click a spot there, then click New Bookmark
(3) Paste the script into the Location line
(4) Assign a name like Native and click Add Bookmark
While viewing an image, click the bookmark(let) to inject the button. Then click the button to rescale the image.
Success?
If you change the zoom level of the "page" you need to click the button again to rescale it in light of the change.
Funda le mpendulo ngokuhambisana nalesi sihloko 👍 0All Replies (10)
Aru3 said
I was asked to squeeze my question into one sentence
That is for the header. You then provide the details in the body of the post..
Right click on an image, and select Open In New Tab/Window.
You can also try this add-on; Thumbnail Zoom Plus {web link} Shows full image when you hover over a thumbnail. Works with Amazon, Baidu Images, Bing Images, Facebook, Flickr, Google+, Google Images, IMDb, LinkedIn, Netflix, Pinterest, Reddit, Twitter, Yandex, YouTube, Wikipedia, Yahoo Images, & many more.
Go to the Mozilla Add-ons Web Page {web link} (There’s a lot of good stuff here) and search for what you want.
Security Issue: Update your Flash Player Version 18.0.0.232
https://www.adobe.com/products/flashplayer/distribution3.html
Note: Windows users must download the “Internet Explorer”
and “Plugin-based browsers” installers.
Note: Edge on Win10 does not use ActiveX version but its own Flash.
See if there are updates for your graphics drivers https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration
Changing the layout.css.devPixelsPerPx pref affects the entire Firefox window (user interface and web page area) and that includes images loaded in a tab. You would have to zoom out a page with a single image.
Note that you can set custom zoom factors.
FredMcD said
That is for the header. You then provide the details in the body of the post.. Right click on an image, and select Open In New Tab/Window.
Well, the interface didn't say it was a header, it just said to ask the question.
And, the question is about images that are opened in their own tab. It's about the image file viewer that's built into the browser. It's about the zoom levels offered in that mode, each of which correspond to a little magnifying glass icon, one with a "+", and the other with a "-". The issue is that neither of those zoom levels correspond to native resolution unless the entire interface scale is set to 1.0. I think that the one that is intended to correspond to native, should do so, *regardless* of whether devPixelsPerPx is 1.0 or not. At least, the image viewer should be excepted from the UI scaling in this way.
If it's a driver issue, then it hasn't been fixed yet, and it's been a problem for as long as I can remember, and I've used firefox for a long time (many years), across many driver updates.
I was hoping, that maybe, there was some other about:config option that I could use to separate the image viewer scaling from the global devPixelsPerPx scaling? I know there's a lot of awesome things in there, and there's no way I could ever be familiar with everything they do as a mere user. It's almost like windows registry in there.
Okulungisiwe
You might be able to work backwards, in other words, if your Windows zoom is 125%, then 80% zoom in Firefox yields 96ppi resolution. But if you use something that isn't quite as round a number, then you may need to add a step to the zoom levels in about:config. Those are here (if you mess up, you can right-click > Reset the preference and start again):
(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.
(2) In the search box above the list, type or paste zoom and pause while the list is filtered
(3) Double-click the toolkit.zoomManager.zoomValues preference and add any necessary levels. For example, to add 75%, you can insert .75 (and a comma) between .67 and .8:
.3,.5,.67,.75,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3
If you want to go below .3 or above 3 (30% and 300%), you need to also adjust one or both of these:
- zoom.minPercent
- zoom.maxPercent
These changes might not take effect in the same window, but you can test in a new window (Ctrl+n)
Isisombululo Esikhethiwe
If you're in the mood to experiment, here's something you can try, a bookmarklet that inserts a "Native" button into the page. It takes into account your current "net" zoom level and shrinks the image to natural dimensions.
(1) Select and copy the following script:
javascript:var btn=document.createElement('button'); btn.style.cssFloat='right'; btn.appendChild(document.createTextNode('Native')); document.body.insertBefore(btn, document.body.firstChild); btn.addEventListener('click', function(){var img=document.querySelector('img');img.style.transform='scale('+(1/window.devicePixelRatio)+')';}, false); void 0;
(2) Right-click a spot on your Bookmarks Toolbar or, if you do not display that bar, click the Bookmarks menu button and right-click a spot there, then click New Bookmark
(3) Paste the script into the Location line
(4) Assign a name like Native and click Add Bookmark
While viewing an image, click the bookmark(let) to inject the button. Then click the button to rescale the image.
Success?
If you change the zoom level of the "page" you need to click the button again to rescale it in light of the change.
Okulungisiwe
Also, I would be remiss if I didn't add:
The forum software detected your Firefox as version 26. Is that correct?
Version 26 is not secure; Mozilla discloses security flaws after each new release. Is something holding you back from upgrading to Firefox 40? Please let us know so we can suggest solutions or workarounds.
If Help > About Firefox shows Firefox 40.0.3, you may need to clear the preference that is misreporting your version number. See: How to reset the default user agent on Firefox.
With Waterfox appended you appear to be using a 64 bit Firefox 26.0 Waterfox version.
- User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:26.0) Gecko/20100101 Firefox/26.0 Waterfox/26.0
It is waterfox, but it's 40.0.2, not 26. Apparently I set it to report version 26 at some point, I'm sure there was a reason, but I don't remember what it was now. There are issues sometimes with the waterfox builds and browser detection, it was probably some specific site compatibility thing... might have been for netflix or youtube. In any case it was a fault of the detection, not of the build.
The entries mentioned by cor-el... if I had something like that which was for the ctrl+0 and/or the image-click-for-native zoom level, then that would work, as I could just pick the inverse of the devPixelsPerPx value (or inverse of OS value when PerPx is -1). But, I searched zoom, and didn't see any entries that seemed to correspond to that, something like the window.devicePixelRatio in jscher2000's javascript.
Anyway, jscher2000's javascript kludge works perfectly, thank you very much for that. I can't really say that it's a complete solution, but I selected it anyway. This really seems like an issue with firefox's image viewer that ought to be fixed in the main builds. After all, it has a feature allowing you to click an image to view it at native resolution, except, it isn't native... that's kind of a big thing. Monitor resolutions are only getting higher, the rate of people setting OS scale to greater than 1 is going up.
Okulungisiwe