W3C home > Mailing lists > Public > www-style@w3.org > March 2008

Re: Retargeted images redux: how it might actually be used on the web

From: Ben Darlow <ben@kapowaz.net>
Date: Fri, 28 Mar 2008 14:35:58 -0500
Message-Id: <8F3A6341-D9D3-46E7-BB7F-B67D77F02CB7@kapowaz.net>
To: www-style@w3.org

On 28 Mar 2008, at 14:09, David Hyatt wrote:
> I think this is a neat idea.  It does seem to me like only one CSS  
> property would be necessary though.  Really isn't this just about  
> picking a scaling algorithm for an image, e.g.,
> image-scale-algorithm: seam-carving;
> ?
> WebKit actually already supports two scaling modes (although the  
> ability to use the low quality interpolation mode is not exposed to  
> CSS but is instead WebKit API).
> Limiting the scope of the seam carving could just involve actually  
> clamping the size of the object where the image is used, e.g., with  
> normal max-width/min-width properties.

Brad Kemper made a similar comment and I'm inclined to agree;  
sticking to existing conventions and not overcomplicating the syntax  
seems like a good way of approaching it. The only possible caveat I'd  
add is that you may only wish to use this scaling algorithm in a  
single dimension (particularly as the algorithm itself doesn't work  
so well on certain types of image). Using max/min-height/width would  
be the sensible way of limiting how much the method is used to scale  
the source image, though, so maybe just those would work; but it  
would feel a bit clumsy having to specify identical values for max  
and min in a given dimension for this purpose.

> One issue with adding properties that affect images is that you run  
> into the problem of wanting to do the same thing with images  
> specified in CSS, such as background images, list images and border  
> images.

Definitely. I was wondering about this myself, and it may well be the  
case that this method would be more useful for background images than  
inline image elements (in my own work I am far more interested in  
flexible scaling of background images to complement UI chrome). I'll  
defer to smarter people on how best to handle this! :)

> Is this algorithm unencumbered and freely implementable?

The technique was originally submitted as a paper to SIGGRAPH  
(available online at http://www.seamcarving.com/arik/imret.pdf).  
There isn't much in the way of legal information concerning who owns  
the technique, but the tone of the paper suggests the authors were  
hoping to see it widely implemented.

Received on Friday, 28 March 2008 19:36:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:02 GMT