Terra Informatica Forums » htmlayout

BUG: Image scaling [3.2.0.27]

(5 posts)

  1. Maxwell
    Member

    Original image (http://esignal.ru/other/net-change-down.png) has 7px x 7px dimensions.

    <html>
    	<body>
    		1st: <img src="http://esignal.ru/other/net-change-down.png" style="width: 7px; height: 7px;" /><br>
    		2nd: <img src="http://esignal.ru/other/net-change-down.png" style="width: 7px; height: 8px;" /><br>
    		3rd: <img src="http://esignal.ru/other/net-change-down.png" style="width: 70px; height: 70px;" /><br>
    	</body>
    </html>
    

    Does any of images except the first one look like OK?

    Posted 3 years ago #
  2. I see that image visually is not centered.

    But one more interesting question arises here.
    Shall any interpolation be used when image is upscaled or not?
    IE and FF don't care and call StretchDIBits "as is".
    Safari does graphics traditionally (for MacOS) better: it uses some form of interpolation.

    Ideally this thing shall also be configurable. Like:

    foreground-repeat: stretch bilinear; or
    foreground-repeat: stretch bicubic;
    Posted 3 years ago #
  3. Maxwell
    Member

    >> I see that image visually is not centered.
    And more: image is horribly blurred even when upscaling it by one pixel.

    >> Shall any interpolation be used when image is upscaled or not?
    In particular case I don't want any interpolation to be applied to the image.

    >> Ideally this thing shall also be configurable. Like: ...
    Yes, but in my opinion interpolation should be disabled by default, otherwise it causes incompatibility with previous versions and a lot of workaround.

    Posted 3 years ago #
  4. "In particular case I don't want any interpolation to be applied to the image."
    You provided two cases where upscaling is in effect. Which one?

    If you have situation where images upscaled by just one pixel - it most probably is a bug of html/css design. Any bimap resampling is pretty noticable computational task and reasults are not good in most cases.

    To fix this thing on your side put in CSS following:

    img { foreground-repeat:no-repeat; }

    so it will override standard

    img { foreground-repeat:stretch; }

    Posted 3 years ago #
  5. Maxwell
    Member

    >> You provided two cases where upscaling is in effect. Which one?
    Both of them.

    >> If you have situation where images upscaled by just one pixel - it most probably is a bug of html/css design.
    Agree, but it must not result in such image distortions, IMHO :)

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.