3

Is it possible to display a PNG as it is given (without any extra blurring or "smoothing") in Chrome?

Comments
  • 1
    You mean like scaled pixelated? https://css-tricks.com/almanac/...
  • 0
    @vintprox
    I mean like displayed unscaled at a whole pixel position with its original width and height defined in pixels.
    It looks like in Gimp when viewed in Firefox.
    The PNG has no transparency.

    I tried the pixelation CSS - but then Chrome goes out of its way to distort some pixels.
    It looks like Chrome is doing some rescaling even though the image is displayed at its exact original size...
  • 1
    It seems to be a fractal problem - getting more ugly the more you dig...
    Chrome actually renders the image smaller than defined. It gives the correct size in the inspector - but a screenshot reveals literal pixel loss.
    WTF is going on here?
  • 2
    Does it also happen when you display the PNG in Chrome directly, i.e. not embedded within a page?
  • 2
    Sounds like you want to control the image renderer, however if you're not up/down scaling the images this shouldn't be the problem.

    https://developer.mozilla.org/en-US...
  • 1
    @Fast-Nop
    It is less blurry (but still some) when opened in a new tab.
  • 2
    Okay, found it:
    Giving --force-device-scale-factor=1 to the chrome executable fixes the issue.

    I still don't know, why there was any scaling going on in the first place...
    ...and how to prevent that from happening to other users visiting the site.
  • 1
    Do you have wrong scaling set for your display?
  • 1
    Use the correct scaling factor for your display. It’s no use to change the flag when you fucked ur system with a wrong factor.
  • 0
    @electrineer
    No, scaling is at 1x in the Xfce settings.
  • 0
    @RocketSurgeon
    That is the least clean solution for now.
    I feel like needing a shower just by reading it...
Add Comment