SVG powered images

Alejandro Tejada capellan2000 at gmail.com
Sat May 13 07:37:52 CEST 2017


Hi All,

Jonathan Lynch wrote:
> Hey guys - I figured out a solution for that bug I had previously
> written a hack for. I use the image.onload handler in the JavaScript
> for this. It works consistently now. I just had to get my order of events
> correct in the JavaScript.
> So please check out the new version

This versions works really well with Animated SVG.
Check a step by step recipe to play them in
my answer to Klaus message:

Klaus  Major wrote about running animated svg:
> not when viewed in Safari on a Mac!

Macs always store a surprise or two! :D
Check if this step by step recipe works
in a Mac:

1) Download most recent version of Jonathan Lynch's stack:
http://livecodeshare.runrev.com/stack/830/SVG-Powered-Images

2) Download this animated svg:
https://openclipart.org/detail/230261/gearanimation02-remix

This mechanical gears animation is better for detecting
any "jump" in the animation conversion.

3) Import mechanical gears animated svg
into Jonathan's stack

4) edit the script of gears bitmap image and
add this script after "resizecontrol" handler

 on mousedown
  put the id of me into tID
    repeat while the mouse is down
       send "processSVG tID" to widget "SVGBrowser1"
    end repeat
 end mousedown

5) Click and hold down the mouse button over
one gear and see them move.

Tell us if this works fine on a Mac (or other OS that
you use on a PC or within a Virtual Machine)

Hermann Hoch wrote:
> I have also a fast method, runs with 30 fps,
> for taking PNG-frames from a video, so that
> converting an SVG animation to PNGs is
> no problem (though I can't see any sense
> in doing that).

Converting a video at 30 frames per seconds
in PNG images? This is amazing! :D

After you publish this stack, we will find many uses
for this feature.

Hermann, your resourceful and detailed stacks
are a rich source of inspiration for many of us:

http://livecodeshare.runrev.com/stack/831/SVG2PNG_6789
http://livecodeshare.runrev.com/stack/832/SVG-TextCrawler

Keep Up your Great Work! :D

Al


More information about the use-livecode mailing list