Float jpegQuality = new Float(<0.0...1.0>); // Choose a quality setting here. JPEGTranscoder jpegTranscoder = new JPEGTranscoder(); jpegTranscoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, jpegQuality); TranscoderInput input = new TranscoderInput(someSVGDocument); OutputStream outStream = new FileOutputStream(someFile); TranscoderOutput output = new TranscoderOutput(outStream); jpegTranscoder.transcode(input, output); outStream.flush(); outStream.close();
Michael Bishop -----Original Message----- From: Veerappan Sridhar [mailto:[EMAIL PROTECTED] Sent: Thursday, October 20, 2005 6:30 AM To: [email protected] Subject: How i can convert an svg file into jpeg file? Hi, Can anyone help me , how i can convert an svg file to a jpeg file using java code, not through command line arugument. sridhar >>> [EMAIL PROTECTED] 10/01/05 7:44 AM >>> For those of you tracking Batik SVN, a commit has just been made that changes how Batik treats SVG documents with no namespace declarations. If your SVG document has no doctype declaration that declares the appropriate namespace (such as one of the SVG DTDs) and the document element has no namespace declaration to put the 'svg' element in the SVG namespace, the document will now not be processed. For example, this would have previously been accepted: <svg> ... </svg> but it now should be changed to: <svg xmlns="http://www.w3.org/2000/svg"> ... </svg> since the document element isn't in the SVG namespace. If an appropriate DTD is used, such as: <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg> ... </svg> or: <!DOCTYPE svg [ <!ATTLIST svg xmlns CDATA #FIXED "http://www.w3.org/2000/svg"> ]> <svg> ... </svg> then no change has to be made. Thanks, Cameron -- e-mail : cam (at) mcc.id.au icq : 26955922 web : http://mcc.id.au/ msn : cam-msn (at) aka.mcc.id.au office : +61399055779 jabber : heycam (at) jabber.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
