0

I have a png image in a html page. Is it possible to display it with its original resolution, regardles of the screen DPI, Windows display scale factor or any other settings ?

For example, my png is 1543 x 780 pixels. If I use this:

<img src="screenshot-00.png" style="width: 1543px; height: 780px">

the image is scaled with 1.4x because I have Custom Scalling in Windows set to 140%.

I want the browser to stop any kind of scalling on images I marked, because my image has sharp edges and when is scaled, they are blured.

3
  • 5
    If you have Windows set to scale 140% then it's Windows doing the scaling and the browser has no control over that. Commented Oct 14, 2024 at 23:26
  • 3
    As Rob said ... there are some settings in the OS and in the browser itself which are under the user's control and that you can't override. I have a minimum font size set that you cannot go below no matter what you do in your page source. People usually have a practical reason why they set these things up, and you shouldn't be able to override them. Commented Oct 15, 2024 at 0:02
  • You have to respect above comments, and avoid overriding what people have chose to, but still you can do this rightfully if it was not people who is scaling up(most windows laptop have 150% scaling themself which would affect your webpage). In such case see this answer it has everything you need(tho you may check out other answers there which are less relavant). Commented Oct 17, 2024 at 13:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.