How to force a certain zoom/upscaling method for images?

User Help for Mozilla Firefox
Post Reply
Franpa
Posts: 72
Joined: November 10th, 2011, 1:31 pm

How to force a certain zoom/upscaling method for images?

Post by Franpa »

For example I'd like it if images were upscaled (when zooming in) using Nearest Neighbour so that the original sharpness is retained. I've tried putting the following in to a new Stylish style but it didn't seem to work:

Code: Select all

#media {image-rendering: crisp-edges;}
and also tried:

Code: Select all

#media {image-rendering: pixellated;}
Computer specifications:
Windows 10 x64|AMD Ryzen 3700X|ASUS Crosshair Hero VIII (WiFi)|16GB 3600MHz RAM|Nvidia Geforce 1070Ti 8GB|Corsair AX760 Power Supply
User avatar
jscher2000
Posts: 11763
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: How to force a certain zoom/upscaling method for images?

Post by jscher2000 »

https://developer.mozilla.org/docs/Web/ ... -rendering

Did you try applying it to inline images as a test?

Code: Select all

img {image-rendering: crisp-edges;}
Franpa
Posts: 72
Joined: November 10th, 2011, 1:31 pm

Re: How to force a certain zoom/upscaling method for images?

Post by Franpa »

That seems to do the trick, thank you very much.
Computer specifications:
Windows 10 x64|AMD Ryzen 3700X|ASUS Crosshair Hero VIII (WiFi)|16GB 3600MHz RAM|Nvidia Geforce 1070Ti 8GB|Corsair AX760 Power Supply
Post Reply