Using SVG files for counter images

Hi,
I have managed to crash vassal by using an SVG file for a unit image. I can stop it crashing by switching to PNG. The SVG file is one that i generated, and it renders correctly in a number of other graphic systems. Are there particular restrictions for vassal? For example, does it need the header? I’ll try rippng that out.

SVG file:

[code]









L 1 Bn


1A


L
4
4
20

[/code]

Looking at the stack trace the error is occurring in getImageSize. I tried switching from points (pt) to pixels (px) but that did not help.

I have all 850 so counters in separate svg files and don’t relish the thought of converting them all by hand to png - I am hoping it is just a svg-dialect issue. :confused:

cheers
Geoff

Thus spake geoffreyphipps:

Looking at the stack trace the error is occurring in getImageSize. I
tried switching from points (pt) to pixels (px) but that did not help.

Please post the stack trace.


J.

Stack trace is 2374343 characters (!) so I can’t post it in full. I will try to post it as an attachment.

I skimmed it to find the most relevant bit:
Hmm, as I pasted it I saw this:
Caused by: java.lang.NumberFormatException: For input string: “36pt”

Sounds like vassal does not like units, I’ll try removing them

Yep, it is the units, when I stripped them out in worked. I’ll change my counter generator to match.

Thus spake geoffreyphipps:

Yep, it is the units, when I stripped them out in worked. I’ll change my
counter generator to match.

The current version of VASSAL (3.2.15) needs the width and height to be
specified in pixels for rendering. This restriction will be lifted in
VASSAL 4.


J.