Hi,

I am new to Batic - SVG Rasterizer.

I am trying to execute the program in the link
http://xml.apache.org/batik/rasterizerTutorial.html#createImage
 i.e., Creating an Image  (SaveAsJPEG.java)

 Anyway I am pasting the code, here too...

import java.io.*;
import
org.apache.batik.transcoder.image.JPEGTranscoder;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;

public class SaveAsJPEG {

    public static void main(String [] args) throws
Exception {

        // create a JPEG transcoder
        JPEGTranscoder t = new JPEGTranscoder();
        // set the transcoding hints
       
t.addTranscodingHint(JPEGTranscoder.KEY_QUALITY,
                             new Float(.8));
        // 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("out.jpg");
        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);
    }
}

I am compiling the program succesfully.

While running the program I am getting errors.. as
follows..

Exception in thread "main"
java.lang.ExceptionInInitializerError
        at
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstra
ctTranscoder.java:121)
        at
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstra
ctTranscoder.java:188)
        at SaveAsJPEG.main(SaveAsJPEG.java:25)
Caused by: java.util.MissingResourceException: Can't
find bundle for base name
org.apache.batik.util.resources.XMLResourceDescriptor,
locale de_DE
        at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle
.java:804)
        at
java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
        at
java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
        at
org.apache.batik.util.XMLResourceDescriptor.<clinit>(XMLResourceDescr
iptor.java:99)
        ... 3 more


Can someone help me with this.

Thanks



        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to