xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Arad" <philip_a...@hotmail.com>
Subject Color changes when rendering to PNG
Date Thu, 17 Jan 2002 19:09:51 GMT

I use this method for rendering the SVG file
to PNG:

The program:
public class SaveAsPNG
    public static void main(String [] args) throws Exception

        // create a PNG transcoder
        PNGTranscoder t = new PNGTranscoder();
        // set the transcoding hints
        // create the transcoder input
        String svgURI = new File(args[0]).toURL().toString();
        TranscoderInput input = new TranscoderInput(svgURI);
        // create the transcoder output
        OutputStream ostream = new FileOutputStream(args[1]);
        TranscoderOutput output = new TranscoderOutput(ostream);
        // save the image
        t.transcode(input, output);
        // flush and close the stream then exit

The SVG (only a part):
  <g id="TagBody" style="fill:#CCCCCC">
    <rect x="0" y="10" width="100" height="25"/>

I recieve a PNG image with the color:#C6C6C6

Is anyone have notice it?
What has to be done to recieve the right color?


Join the world’s largest e-mail service with MSN Hotmail. 

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message