// s'il d�sire une capture normale
if (value == JOptionPane.YES_OPTION) {
int width = canvas.getSize().width;
int height = canvas.getSize().height;
GraphicsContext3D ctx = canvas.getGraphicsContext3D();
Raster ras = new Raster();
ras.setType(Raster.RASTER_COLOR);
ras.setSize(width, height);
ras.setSrcOffset(0, 0);
image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
ImageComponent2D image2d =
new ImageComponent2D(ImageComponent2D.FORMAT_RGB, image);
ras.setImage(image2d);
ctx.readRaster(ras);
// Now strip out the image info
ImageComponent2D img_src = ras.getImage();
image=img_src.getImage();
}
// s'il d�sire une capture grande qualit�
else{