W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: non-rectangular images & <img> tag

From: Jeff Schiller <codedread@gmail.com>
Date: Wed, 25 Apr 2007 11:24:45 -0500
Message-ID: <da131fde0704250924q22fba56yec93379afb949ef3@mail.gmail.com>
To: "Matthew Raymond" <mattraymond@earthlink.net>
Cc: "Olivier GENDRIN" <olivier.gendrin@gmail.com>, public-html@w3.org

On 4/24/07, Matthew Raymond <mattraymond@earthlink.net> wrote:
>
> Olivier GENDRIN wrote:
> > But perhaps this should be done on the CSS side, as far it's a
> > presentational issue...
>
>    I would say so. In fact, I'd like to see something like this:
>
> | <img src="Image.png" alt="" style="crop: url('circle.svg')" />
>
>    This would allow you to use the alpha values from images and and SVG
> files to perform cropping of both images and other content.

But if you're going to want to use SVG for this, then you'd be best to
the whole thing today directly in SVG.  i.e. the SVG would contain the
"image.png" raster in an SVG:image element, then it would be masked by
a circle (or whatever) such that the image is cropped.  Then when you
deploy this in your HTML it would be:

<object type="image/svg+xml" data="cropped-image.svg" width="300" height="200">
  <img src="image.png" width="300" height="200"></img>
</object>

This would work today in browsers that support SVG and contain
fallback for those that don't.  In my mind, no need to invent a new
HTML facility for this because my assumption is that all browsers will
eventually support SVG (we're kind of waiting on Internet Explorer).
Received on Wednesday, 25 April 2007 16:25:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:53 GMT