xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "classloader" <classloa...@hotmail.com>
Subject SVG->PNG, background tranparency problem. Help please
Date Sun, 03 Mar 2002 19:45:07 GMT
I know this is an old question, I did try to search the answers and tried a lot, but I still
can not figure it out. Could anyone give me a hint?

I have a very small SVG file, which has a freehand path. [http://www.dynazone.com/SVG/svg5.svg]
I did the following to produce a PNG file called svg5.png [http://www.dynazone.com/SVG/svg5.png]

    java -jar batik-resterizer.jar svg5.svg

But after I create the webpage with that svg5.PNG file, I put it on top of my testing webpage,
and browse it with IE 6. I found its background is not transparent at all. 
[http://www.dynazone.com/SVG/movingNotTransparent.htm]

I tried different approaches, but all failed:
1) java -jar batik-resterizer.jar -bg 0.0.0.0 svg5.svg  --- failed
2) Change the PNGTranscoder.java, change variable "a" to 0. a is alpha channel value. ---
failed again
... ...
Now matter what I have tried, the background of the generated PNG file was either all black
or all white, but never transparent.(I am new to Image processing, maybe something above I
did is not in correct way. Correct me please. )

After some search, I found some PNG files got from somewhere else could work very well with
my test page.
[http://www.dynazone.com/SVG/movingTransparent.htm]

So, Can anyone give me some suggestion how I can convert my svg5.svg to a svg5.PNG with transparent
background with Batik?


Thanks a lot,
Leo

Mime
View raw message