Hi Pierre,
BEGUE Pierre wrote:
This works fine for me with the current SVN version of Batik.
and this my code :
try{
out.flush();
Rectangle rect = new Rectangle(0,0,788,466);
//Creation d un JPEG transcoder
JPEGTranscoder t = new JPEGTranscoder();
//JOptionPane JOptPan = new JOptionPane();
//JOptPan.showMessageDialog(null,"lancement de la convertion
JPEG","MESSAGE",JOptPan.PLAIN_MESSAGE);
//String str = JOptPan.showInputDialog("entrez la valeur de la
qualite image (0.1<x<0.9)");
//float val = Float.parseFloat(str);
// Choix de la qualite image
t.addTranscodingHint(JPEGTranscoder.KEY_QUALITY,new Float(0.9));
t.addTranscodingHint(JPEGTranscoder.KEY_WIDTH, new
Float(rect.width));
t.addTranscodingHint(JPEGTranscoder.KEY_HEIGHT, new
Float(rect.height));
t.addTranscodingHint(JPEGTranscoder.KEY_AOI, rect);
// Creation d un transcoder input
String svgURI = new File(fichier).toURL().toString();
TranscoderInput input = new TranscoderInput(svgURI);
// Creation d un transcoder output
OutputStream ostream = new FileOutputStream(sortie);
TranscoderOutput output = new TranscoderOutput(ostream);
ostream.flush();
// Sauvegarde de l image
t.transcode(input, output);
ostream.flush();
ostream.close();
}catch(Exception e){}
---------------------------------------------------------------------
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]