RE: Inconsistencies when including content via the image element.

Jim,

I have a bit of a problem with your request.

Unless the image metadata has size information, how do you propose to
properly size the image? For example, do you want the image size to be based
on the pixel resolution of the screen? In this case, how is my perl engine
on a screenless server supposed to determine the size of the image without
aany geometric data?

My understanding (*very* incomplete as it is) is that raster images are
sized by mapping them pixel by pixel onto the screen in HTML unless metadata
is present.

This is not possible if we are not assuming screens are there at all (for
example using a vector-based XY plotter to generate the images).

While it is true that HTML interpolates image size based on pixel size or
uses image metadata, this is one of the biggest flaws in the HTML rendering
engine when it comes to consistently rendering images.

Maybe a reasonable compromise could be to make it possible to use the
metadata if you want to, and to ignore it if it is either not there or if
you do not want to use it.

I propose that this problem is murkier than has been touched so far and hope
others can provide a better understanding of the reasoning behind the
current raster-image handling.

Ronan

------------
Ronan Oger, Director
RO IT Systems GmbH
www.roitsystems.com | www.roasp.com



>-----Original Message-----
>From: www-svg-request@w3.org [mailto:www-svg-request@w3.org]On Behalf Of
>Jim Ley
>Sent: Friday, July 05, 2002 12:56 PM
>To: www-svg@w3.org
>Subject: Inconsistencies when including content via the image element.
>
>
>
>Hi,
>
>The current handling of raster images in the image element is very
>problematical to me, and is inconsistent with the behaviour of svg images
>from the image element.
>
>If you include a raster image with a height/width the raster image is
>scaled to that height width, indeed it is _impossible_ to use the height
>and width that the image defines (an image has a height and width,
>forcing this to be known outside of the object itself is wrong and
>inconsistent with other mark-up languages, which always have the viewbox
>of the image defined by the image itself.)     However if you include an
>svg image via the image element the image is not scaled to the height
>width set in the image but preserves the sizing inherent to the file,
>unless it has a viewBox set.
>
>Consider the 100px by 100px svg image (
>http://jibbering.com/2002/7/rect.svg ) :
><svg width="100px" height="100px">
><rect x="0" y="0" height="100px" width="100px" fill="red"/>
></svg>
>
>and the raster 640px by 480px raster image (
>http://jibbering.com/imgs/shepherds.jpg )
>
>When you include them in an SVG document like so:
><image xlink:href="http://jibbering.com/imgs/shepherds.jpg" height="500"
>width="500"/>
><image xlink:href="http://jibbering.com/2002/7/rect.svg" height="500"
>width="500"/>
>
>The raster image is scaled, the SVG image is not.  If you include a
>viewBox in the first it would be of course, but why is a raster image
>always assumed to have a viewBox equal to its size and an svg image not?
>
>The height and width of an image is a property the image, and I think
>it's very important to be able to use these properties - at the moment
>they are not available - this means any properties which are defined in
>the co-ordinatespace of the image, cannot be mapped to the image unless
>we know the size.
>
>Jim.
>
>
>
>

Received on Friday, 5 July 2002 07:34:52 UTC