embed random images

Discuss SVG code, accessible via the XML Editor.
adrigen
Posts: 2
Joined: Wed Jul 14, 2010 1:25 pm

embed random images

Postby adrigen » Wed Jul 14, 2010 1:32 pm

I'd like my svg graphic to contain a row of embedded images taken randomly from a list of urls.
How do you recommend I would go about accomplishing this?

Initially I thought I would use javascript (which I'm not that familiar with) but now that I am looking at it... it may be more suitable for animation.

I need to generate svg code, so will i need to use php instead?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: embed random images

Postby brynn » Fri Jul 30, 2010 4:49 am

Welcome adrigen!

I'm sorry no one has answered your message, but it may be that no one here really has the answer.
The only comment I have is that SVG/XML....isn't ready for primetime, lol. I think until Internet Explorer is capable of displaying SVG, there won't be a widespread use of SVG images on the internet. And it appears that MS has taken the first steps towards this, although I haven't seen a target date or expected release version set or estimated (which doesn't mean there is none).

It sounds to me like what you want to do, could be done with a script of some kind (I know little to nothing about scripts). To my knowledge, animation can't be randomized, although now that I think of it, there should be a program out there somewhere, with such a feature. As for Inkscape, animation support is a "long term goal", but just how long has not been estimated (afaik). There is one program I've heard of....Synfig, that is a vector-based animator. But again, until IE can support/display SVG, widespread use on the internet can't happen. Well I mean, you could still use SVG (or vectors in general) on the internet, it's just that not everyone will be able to see it.

Sorry I can't be more helpful. But at least my stab at a reply will bump your topic back to the top of the index, and maybe someone who knows more will see it.
All best :D

adrigen
Posts: 2
Joined: Wed Jul 14, 2010 1:25 pm

Re: embed random images

Postby adrigen » Fri Jul 30, 2010 8:24 am

That's great, thanks.
I decided to use php and just add .svg to the list of files it parses.
Since then I have realised I can use javascript to add elements too, and I think this would be more appropriate because its client side.

Bugger IE, i'm going to carry on thinking svg is as awesome as it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: embed random images

Postby ~suv » Fri Jul 30, 2010 12:14 pm

brynn wrote:The only comment I have is that SVG/XML....isn't ready for primetime, lol.

What? I disagree ;) . Maybe that impression is due to «SVG seems to be statistically underrepresented in terms of access through Google searches, and thus, it is harder to find SVG content.» (quoted from Reinventing Fire » Blog Archive » Formata Non Grata).


Return to “SVG / XML Code”