Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

svg2swf stuck in loop

Help
2010-10-14
2012-12-08
  • Timothy Reaves
    Timothy Reaves
    2010-10-14

    I'm finding that for some SVG files, the app seems to get stuck in a loop, though not necessarily infinite.  This manifests itself in two ways: 1) I have some images that take 50 hours on a 32 CPU Solaris 10 box, and 2), some images - when using swfdump for info - will have single line segments with more that 800,000 arc segments.  When looking at the arc segments, amny are duplicates.

    This seems to in some way be related to the -cubic value.  For some images, they will only display this behavior when the -cubic is 20 (which is what I am using trying to optimize the image size), while for others, it happens when the cubic is the default.

    Any thoughts on this?

     
  • Timothy Reaves
    Timothy Reaves
    2010-10-14

    I forgot to mention that on that 50 hour image (and there a re a lot of them), I can run them on a different machine, or with a different cubic, and it will finish in 0.20 seconds.

     
  • Philip de Nier
    Philip de Nier
    2010-10-14

    Yes, I've come across this many times. I also seem to recall seeing different behavior on Windows and Linux.

    The problem is the algorithm that is used to approximate cubic bezier curves with quadratic bezier curves - flash doesn't support cubic. The algorithm implemented in libming
    http://ming.cvs.sourceforge.net/viewvc/*checkout*/ming/ming/src/shape_cubic.c?revision=1.10
    has a tendency to get it badly wrong. A complication is that one -cubic value will work with some images but not others.

    I did find some articles on the Internet a year or more ago that described various approximation approaches, but I didn't get so as far as to find one that solves the issue.

    It is possible that this libming bug report points to the issue:
    http://bugs.libming.org/show_bug.cgi?id=61
    "error threshold is not normalized. See url above for an example."

    Philip

     


Anonymous


Cancel   Add attachments