I'm using ming via svg2swf. It takes an SVG element, calls into
ming to create the Flash equivalents, and then saves the SWF. My SVG
images are vectorized raster images, so they are not very clean, and
almost all lines are captured as curves. Most of the time this works
Svg2swf sets the sub threshold to 100; so a lot of my images,
this produces SWF files that are a problem for Flash to display (in some
cases locking up or crashing the viewer). I used swfdump (from Adobe),
and saw that I had single lines with - in some cases - 800,00 arc
segments. In playing around with different values for this parameter, I
thought 20 seemed to work better. The files produced were smaller, with
fewer of the arc segments per line.
Now what I am finding is that not only is this value not working
the same for all images, it seems that ming is looping an unreasonable
amount (probably in the SWFShape_approxCubic function). Some of these
image conversions run for days on a 32CPU Solaris box. The longer the
process takes, the larger the files that are produced, and the more arc
segments per line. What is confusing for me is that for some images,
this happens with the 100 cubic value, and for others, the 20.
Also, these are all black & white line drawings.
I'd like to get a better understanding of what is going on here,
and try to come up with a way of 'fixing' this. Some way of being able
to look at the SVG (with a program or some-such) and determine the cubic
to use before conversion. I understand that it may not be this easy, or
even possible. But I'd like to hear any advice anyone has.