- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Tue, 6 Oct 2009 18:47:08 -0700
- To: Bert Bos <bert@w3.org>
- Cc: "www-style@w3.org" <www-style@w3.org>
On Oct 6, 2009, at 10:49 AM, Bert Bos <bert@w3.org> wrote: > A more general problem is that the latest text can cause images to be > scaled up as well as down, and that may not be optimal for raster > images. The worst case is an image whose width is just above 50% of > the > background positioning area. It will be scaled to almost twice its > size. > > The worst case of the previous version is an image that is almost 100% > wide: it will be reduced to almost half its size. However, it is > likely > that a (raster) image scaled down to half its size looks better than > one scaled to double its size, at least assuming a scaling algorithm > that interpolates pixels rather than drops them. There is no worse case for 'background-size' values of 'contain' or 'cover', or 'border-image-repeat' of 'stretch'. For those, raster images can be stretched to thousands of times bigger than intrinsic. So as an author, whether using those or using 'round', I would need to edit the image or edit the CSS (reducing the background positioning area, for instance) to try to prevent that, if I found it objectionable. But I actually don't so much (find it objectionable), except perhaps in that very extreme case. In the tests I did with two or more tiles in border-image, I found the upscaling to be much preferable to the increased distortion of downscaling everything. > 5.6 Border-image drawing process > > The effect of 'round' on border images is to scale them down if > necessary to make them fit. If the effect of 'round' on *background* > images is to scale them either up or down (see 3.9 above), then maybe > the algorithm for border images should do the same, just in case > somebody tries to align a background to a border. Note that in nontrivial cases, it will be unlikely that you'd be able to align them easily anyway, if you are not slicing the images at padding edges or border box edges, or if you are using outsets, for intance.
Received on Wednesday, 7 October 2009 01:47:56 UTC