Lyoko Freak: 2005 - 2015. Return to the past now....

It is currently Mon Jun 02, 2025 12:30 am

Has anybody here heard of SVG?

For discussion of computers and the Internet, as well as a place for you to post your websites to gain more traffic.

Moderators: The Administrators, Moderators


Has anybody here heard of SVG?

Postby Tangent128 » Fri Jul 27, 2007 12:17 pm

Has anybody here heard of SVG? It's a HTML-like language used for making graphics. It's interesting because you use Javascript and animation tags to make the graphics interactive.

So... has anybody else experimented with it?
(yeah, the cool links in my old sig died. :( A few nerdy newish projects are here. )
User avatar
Tangent128 offline
Star Fighter
Star Fighter
 
Posts: 1454
Joined: Tue Jun 27, 2006 1:32 pm
Location: Virginia

Postby Overcaffeinated Sloth » Fri Jul 27, 2007 12:24 pm

Sounds pretty cool... how does it work?

Overcaffeinated Sloth offline
 

Postby Tangent128 » Fri Jul 27, 2007 2:41 pm

Like HTML, you save a text file with SVG code in it with the right extension, then open it in a browser that understands SVG. Right now, that means Firefox or Opera.

If you have either, save this in a file named something.svg and open it.
<svg xmlns="http://www.w3.org/2000/svg"
width="100%" height="100%">
<rect x="0" y="0" width="20%" height="100%" fill="blue" />
<rect x="0" y="0" width="75%" height="25%" fill="black" />
<circle cx="100%" cy="100%" r="25%" fill="red"
onmouseover="setAttribute('fill','yellow')"
onmouseout="setAttribute('fill','red')"
/>
</svg>
(yeah, the cool links in my old sig died. :( A few nerdy newish projects are here. )
User avatar
Tangent128 offline
Star Fighter
Star Fighter
 
Posts: 1454
Joined: Tue Jun 27, 2006 1:32 pm
Location: Virginia

Postby Lyokofreak » Wed Dec 05, 2007 8:01 pm

I like the SVG format because of the Zoom-and-not-loose-quality property, and its great for animating. I can see including it in an HTML file with the <embed> tag, but all browsers don't support it meaning they either need plugins or can't run it at all. Animated PNG would be a better alternative since it's nicely compressed bitmap and doesn't lose quality like JPEG & doesn't have the issues GIF's do.

Actually, Scalable Vector Graphics is data in XML, not HTML-like ;p.
Last edited by Lyokofreak on Wed Dec 05, 2007 9:39 pm, edited 2 times in total.
How to write an infinite Jesus pwns loop in PHP:
while($_SERVER[PHP_SELF])
{
echo "Jesus pwns!";
}
User avatar
Lyokofreak offline
Star Fighter
Star Fighter
 
Posts: 1123
Joined: Sun Oct 09, 2005 10:41 am

Postby timekitten » Wed Dec 05, 2007 8:54 pm

Whoa, interesting! o_0 I've never heard of this before. Shows you learn something new every day. :D *plays around*
ImageImage
Image
User avatar
timekitten offline
Friend of Team Lyoko
Friend of Team Lyoko
 
Posts: 225
Joined: Sun Aug 19, 2007 4:42 pm
Location: Stalking you. >:D

Postby Tangent128 » Wed Dec 05, 2007 9:50 pm

LyokoHaCK wrote:I like the SVG format because of the Zoom-and-not-loose-quality property, and its great for animating. I can see including it in an HTML file with the <embed> tag, but all browsers don't support it meaning they either need plugins or can't run it at all. Animated PNG would be a better alternative since it's nicely compressed bitmap and doesn't lose quality like JPEG & doesn't have the issues GIF's do.

Actually, Scalable Vector Graphics is data in XML, not XML-like ;p.


I said HTML like... ;)

Correct me if I'm wrong, but only the Opera Alpha supports aPNG. So actually SVG is more compatible. (Firefox, Safari, that K one...) Though only Opera supports non-javascript animation...

aPNG probably would fit into existing image editors better, though. The GIMP already does animated gifs. (Though it isn't very good for actual drawing. I have no art talent, so I just CG everything anyway, but...) InkScape is the only SVG editor I know, and it does no animation at all. Pity... Ah well. Hand coding builds character. And cleaner code.


Reminds me, I did an animated SVG trailer thing for my English project on 1984. Only known to work in Opera, though. (Copy&paste address)
http://files.myopera.com/Tangent128/files/1984.svg


timekitten wrote:Whoa, interesting! o_0 I've never heard of this before. Shows you learn something new every day. *plays around*

If you do anything remotely interesting, post it here. :) And feel free to ask me anything.
(yeah, the cool links in my old sig died. :( A few nerdy newish projects are here. )
User avatar
Tangent128 offline
Star Fighter
Star Fighter
 
Posts: 1454
Joined: Tue Jun 27, 2006 1:32 pm
Location: Virginia

Postby Jeremified » Wed Dec 05, 2007 10:29 pm

SVG is incredible. It's like a picture MIDI.
thank you all for the good memories <3
User avatar
Jeremified offline
Lyoko Freak
Lyoko Freak
 
Posts: 6051
Joined: Thu Feb 02, 2006 11:40 pm

Postby Lyokofreak » Thu Dec 06, 2007 12:40 am

Tangent128 wrote:
LyokoHaCK wrote:I like the SVG format because of the Zoom-and-not-loose-quality property, and its great for animating. I can see including it in an HTML file with the <embed> tag, but all browsers don't support it meaning they either need plugins or can't run it at all. Animated PNG would be a better alternative since it's nicely compressed bitmap and doesn't lose quality like JPEG & doesn't have the issues GIF's do.

Actually, Scalable Vector Graphics is data in XML, not XML-like ;p.


I said HTML like... ;)

Correct me if I'm wrong, but only the Opera Alpha supports aPNG. So actually SVG is more compatible. (Firefox, Safari, that K one...) Though only Opera supports non-javascript animation...

aPNG probably would fit into existing image editors better, though. The GIMP already does animated gifs. (Though it isn't very good for actual drawing. I have no art talent, so I just CG everything anyway, but...) InkScape is the only SVG editor I know, and it does no animation at all. Pity... Ah well. Hand coding builds character. And cleaner code.


Reminds me, I did an animated SVG trailer thing for my English project on 1984. Only known to work in Opera, though. (Copy&paste address)
http://files.myopera.com/Tangent128/files/1984.svg


timekitten wrote:Whoa, interesting! o_0 I've never heard of this before. Shows you learn something new every day. *plays around*

If you do anything remotely interesting, post it here. :) And feel free to ask me anything.


I typed XML like, edited, found out I put it in the wrong place, and edited again. That's how you got the phail quote :p

Simple Javascript time-based functions do the trick frame by frame, but like normal video editing, it's not 3 clicks.
How to write an infinite Jesus pwns loop in PHP:
while($_SERVER[PHP_SELF])
{
echo "Jesus pwns!";
}
User avatar
Lyokofreak offline
Star Fighter
Star Fighter
 
Posts: 1123
Joined: Sun Oct 09, 2005 10:41 am

Postby timekitten » Thu Dec 06, 2007 1:50 am

Tangent128 wrote:
timekitten wrote:Whoa, interesting! o_0 I've never heard of this before. Shows you learn something new every day. *plays around*

If you do anything remotely interesting, post it here. :) And feel free to ask me anything.
Well, is this remotely interesting? :P http://files.myopera.com/timekitten/files/choco.svg
ImageImage
Image
User avatar
timekitten offline
Friend of Team Lyoko
Friend of Team Lyoko
 
Posts: 225
Joined: Sun Aug 19, 2007 4:42 pm
Location: Stalking you. >:D

Postby Jeremified » Thu Dec 06, 2007 2:22 am

LyokoHaCK wrote:Animated PNG would be a better alternative since it's nicely compressed bitmap and doesn't lose quality like JPEG & doesn't have the issues GIF's do.
Dude... animated PNGs would be SWEET. The closest we can get is the .ani format, used for animated cursors... if someone can develop a way to view those on a webpage, that would be amazing. :)
thank you all for the good memories <3
User avatar
Jeremified offline
Lyoko Freak
Lyoko Freak
 
Posts: 6051
Joined: Thu Feb 02, 2006 11:40 pm

Postby Tangent128 » Thu Dec 06, 2007 8:52 am

timekitten wrote:Well, is this remotely interesting? :P http://files.myopera.com/timekitten/files/choco.svg

Oooh, nice! :D Did you hand do that? The code looks pretty clean.

Jeremified wrote:
LyokoHaCK wrote:Animated PNG would be a better alternative since it's nicely compressed bitmap and doesn't lose quality like JPEG & doesn't have the issues GIF's do.
Dude... animated PNGs would be SWEET. The closest we can get is the .ani format, used for animated cursors... if someone can develop a way to view those on a webpage, that would be amazing. :)

The Opera Alpha does it, I think, but a Firefox developer actually invented the format I believe. I don't know of any public Firefox versions supporting it yet, though. But yes. Animated 24 bit color with alpha channel? It's about time the 21st century got here.
(yeah, the cool links in my old sig died. :( A few nerdy newish projects are here. )
User avatar
Tangent128 offline
Star Fighter
Star Fighter
 
Posts: 1454
Joined: Tue Jun 27, 2006 1:32 pm
Location: Virginia

Postby timekitten » Thu Dec 06, 2007 11:17 am

Tangent128 wrote:
timekitten wrote:Well, is this remotely interesting? :P http://files.myopera.com/timekitten/files/choco.svg

Oooh, nice! :D Did you hand do that? The code looks pretty clean.

Yeah, took about an hour to make. And another hour editing it here: http://files.myopera.com/timekitten/files/chocoinvert.svg I'm trying to figure out how to make curves with the path tag, but no luck.
ImageImage
Image
User avatar
timekitten offline
Friend of Team Lyoko
Friend of Team Lyoko
 
Posts: 225
Joined: Sun Aug 19, 2007 4:42 pm
Location: Stalking you. >:D

Postby Tangent128 » Thu Dec 06, 2007 12:18 pm

Try the "Q" command-
"Q cx cy x y" draws a quadratic curve to <x> using <cx> as a control point.

I find the official spec to be of immense help, if hard to read sometimes:
http://www.w3.org/TR/SVG11/

This is the page on paths: (It also mentions cubic paths with two control points)
http://www.w3.org/TR/SVG11/paths.html

Again, feel free to ask me about anything. I don't usually get to talk about this stuff. :D

(By the way, fill, stroke, & stroke-width can also be done as normal attributes; they don't have to be put under style. Not worth the trouble to change it, though.)
(yeah, the cool links in my old sig died. :( A few nerdy newish projects are here. )
User avatar
Tangent128 offline
Star Fighter
Star Fighter
 
Posts: 1454
Joined: Tue Jun 27, 2006 1:32 pm
Location: Virginia

Postby adrimarie » Fri Dec 07, 2007 3:46 am

I've heard about SVG from college (while I was still taking web designing classes) but the classes did not elaborate further, as it was still a new format back then.

Would be really nice to learn a bit of SVG and take advantage of its capabilities and incorporate them with website designing one day, but no time right now (work and real-life stuff going on). One day hopefully I'll get to learn more. Too bad I'm XML-deficient... the only "XML" that I know of is in XHTML. x.x
User avatar
adrimarie offline
Popular Kid
Popular Kid
 
Posts: 102
Joined: Tue Nov 07, 2006 12:45 am
Location: In the Supercomputer Lab

Postby Jeremified » Fri Dec 07, 2007 6:47 pm

Tangent128 wrote:Animated 24 bit color with alpha channel?

Also known as 32-bit color. ;)
thank you all for the good memories <3
User avatar
Jeremified offline
Lyoko Freak
Lyoko Freak
 
Posts: 6051
Joined: Thu Feb 02, 2006 11:40 pm

Postby Tangent128 » Fri Dec 07, 2007 8:31 pm

I wouldn't call transparency color... ;)

Ok, how's this?
(yeah, the cool links in my old sig died. :( A few nerdy newish projects are here. )
User avatar
Tangent128 offline
Star Fighter
Star Fighter
 
Posts: 1454
Joined: Tue Jun 27, 2006 1:32 pm
Location: Virginia

Postby Jeremified » Sat Jan 19, 2008 4:30 pm

Tangent128 wrote:I wouldn't call transparency color... ;)

It's considered a color because it's stored the same way as RGB channels are stored (one byte at a time).

Also, I'm surprised nobody's brought up Inkscape before. It's the Gimp-ish editor for SVG. I made an N tribute using it. Ninja-dash.svg

http://www.inkscape.org/
thank you all for the good memories <3
User avatar
Jeremified offline
Lyoko Freak
Lyoko Freak
 
Posts: 6051
Joined: Thu Feb 02, 2006 11:40 pm

Postby Kamekai » Sat Jan 19, 2008 5:39 pm

Yeah, Inkscape's good. I've never really used it much, but it serves it's purpose. Best part is, it uses the .gtk runtime environment, so I don't have to reconfigure things like root paths all over again. =D
Image
User avatar
Kamekai offline
Star Fighter
Star Fighter
 
Posts: 1422
Joined: Thu Jun 28, 2007 1:03 am

Postby Tangent128 » Sat Jan 19, 2008 10:53 pm

/ hacks around hotlinking filter...
Not bad. I'd suggest adding some filling.

I've tried Inkscape. I still prefer Notepad.
(yeah, the cool links in my old sig died. :( A few nerdy newish projects are here. )
User avatar
Tangent128 offline
Star Fighter
Star Fighter
 
Posts: 1454
Joined: Tue Jun 27, 2006 1:32 pm
Location: Virginia

Postby Kamekai » Sun Jan 20, 2008 12:07 am

Tangent128 wrote:/ hacks around hotlinking filter...


Yeah, that was pretty easy. Just copy the URL and paste it in the address bar. As for the actual image, not too bad, but like Tangent said it could use a little color. :)

As for Notepad... I really only use it for aftertouches, things I can't manage to do Inkscape. Although, Inkscape has a nice little XML editor. (While somewhat incomplete, i.e. doesn't support the 'a xlink:href' tag.)
Image
User avatar
Kamekai offline
Star Fighter
Star Fighter
 
Posts: 1422
Joined: Thu Jun 28, 2007 1:03 am

Postby Tangent128 » Mon Jan 21, 2008 12:52 am

Eh, I just can't stand all the extra tags Inkscape inserts.

Anyways, I've been doing some more experiments, webcomic-style.

Linky.

I don't consider it an actual webcomic project (come on, two pages?), though if anybody wants to adopt any techniques used, they can. (It's also an experiment in using XSLT stylesheets to put a viewer around the comic. Delete the <?xml-stylesheet ...> line if you save it to get just the comic, or else save the stylesheet files too for the viewer.)

Opera users should see some minor animations.
(yeah, the cool links in my old sig died. :( A few nerdy newish projects are here. )
User avatar
Tangent128 offline
Star Fighter
Star Fighter
 
Posts: 1454
Joined: Tue Jun 27, 2006 1:32 pm
Location: Virginia

Postby FènéethxAelita » Sun Feb 03, 2008 6:32 pm

Isn't it true that Jeremyfied has experience with ani.
Firefox barley supports .svg, animations don't work, but moseover does, text may overlap for animations.
Reminds me of they way PS3 supports .gif files, frames overlap.
"We are the Borg. Lower your shields and surrender your ships. Your biological and technological distinctiveness will be added to our own. Your culture will adapt to service us. RESISTANCE IS FUTILE." - Borg Collective
User avatar
FènéethxAelita offline
Friend of Team Lyoko
Friend of Team Lyoko
 
Posts: 246
Joined: Wed Feb 07, 2007 5:12 am
Location: Chimera rally in U.K., in Tamriel, kicking daedra ***, or in Lyoko, protecting Aelita (who else?)


Who is online

Users browsing this forum: No registered users and 3 guests