Pessoal:
Como faço para salvar em um arquivo uma imagem
desenhada pelo usuário em um Canvas?
Pode ser em qualquer formato (.gif, .jpg, .bmp,
.png).
Achei em http://developer.java.sun.com/developer/qow/archive/40/index.html um
artigo sobre isso.
Tem o seguinte trecho de código:
Rectangle rect = can.getBounds();
Image fileImage = createImage(rect.width,rect.height); Graphics g = fileImage.getGraphics(); //write to the image can.paint(g); // write it out in the format you want //dispose of the graphics content g.dispose(); O que devo colocar no lugar de "// write it out in
the format you want"?
Em tempo: Como faço para imprimir um "formulário"
(JFrame)?
Obrigado,
Tomaz
Fone: (19) 3287 7060 - r. 245
======================== |
- Re: [java-list] Salvar_Imagem_e_Impressão Tomaz Foá Binsztajn
- Re: [java-list] Salvar_Imagem_e_Impressão Joel Oliveira