|
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
