Opera 9.5 introduces support for displaying SVG using IMG

Post and comment on recent Inkscape news.
User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Opera 9.5 introduces support for displaying SVG using IMG

Postby microUgly » Wed Oct 17, 2007 10:23 am

Another sign of how serious Opera is towards SVG, the latest build of version 9.5 introduces the ability to display SVG images using IMG HTML element.

Here's a test for people using Opera 9.5 build 9594:
Image

Code: Select all

<img src="http://www.inkscape.org/images/inkscape_button.svg" />


Unfortunately the height and width attributes do not resize the image, rather it just changes the viewable area.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Opera 9.5 introduces support for displaying SVG using IMG ta

Postby microUgly » Wed Oct 17, 2007 10:29 am

Oh, and I should have said that Opera also supports the use of SVG images for CSS backgrounds.

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: Opera 9.5 introduces support for displaying SVG using IMG ta

Postby sas » Wed Oct 17, 2007 9:32 pm

microUgly wrote:Unfortunately the height and width attributes do not resize the image, rather it just changes the viewable area.

Have you tried it with a sizeless SVG image? (By a "sizeless" SVG image, I mean an SVG image with no width and height of its own, just a viewBox.) I would guess that the width and height attributes of the HTML img element would then control the size of the image (because this is required by the SVG spec, and it's the only behaviour that would make sense anyway).

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Opera 9.5 introduces support for displaying SVG using IMG ta

Postby microUgly » Thu Oct 18, 2007 8:50 am

Yeah, that works. I guess Opera has to deal with a conflict of standards here.

HTML standard says that height and width for IMG scales the image, whilst SVG says the image should not be scaled if width and height is specified in the SVG. I'm guessing the SVG standard would take priority so they have probably implemented the feature properly.

User avatar
capnhud
Posts: 435
Joined: Mon Jun 04, 2007 8:30 pm
Location: U.S.A

Re: Opera 9.5 introduces support for displaying SVG using IMG

Postby capnhud » Fri Nov 02, 2007 3:20 pm

Oh, and I should have said that Opera also supports the use of SVG images for CSS backgrounds.


Is this a coming feature for web standards?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Opera 9.5 introduces support for displaying SVG using IMG

Postby microUgly » Fri Nov 02, 2007 4:18 pm

It's definitely included with CSS3 as I seen a documented example using an SVG file as a backround on the W3C site. I can't find any confirmation of what filetypes are supported by CSS2. This may be because the CSS standard does not define what image formats can be used as a background (i.e. it's up to the browser).

In any case, I wouldn't get too excited. MS has taught us very well that standards do not mean standardisation. IE7 still has very limited support for CSS2. And since no version of IE supports SVG I wouldn't expect SVG images to ever be widely supported.


Return to “News, Events & Developments”