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
Hi

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();
        //t.addTranscodingHint(PNGTranscoder.KEY_FORCE_TRANSPARENT_WHITE,new 
Boolean(true));
        // 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
        ostream.flush();
        ostream.close();
        System.exit(0);
    }
}

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

I recieve a PNG image with the color:#C6C6C6

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

Philip




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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


Mime
View raw message