Ananth,
The java.awt.Robot class in the JavaTM 2 SDK, Standard Edition, v 1.3 Beta
release will allow you to capture an image containing pixels read from the
screen. The com.sun.image.codec.jpeg.* classes will allow you to save the
captured image as a jpeg.
java.awt.Robot
createScreenCapture
public Image createScreenCapture(Rectangle screenRect)
Creates an image containing pixels read from the screen.
Parameters:
screenRect - Rect to capture in screen coordinates
Returns:
The captured image
Throws:
SecurityException - if readDisplayPixels permission is not granted
See Also:
SecurityManager.checkPermission(java.security.Permission),
AWTPermission
For a sample of the com.sun.image.codec.jpeg.* classes :
http://webmirror.eng/products/java-media/2D/samples/suite/Image/JPEGFlip.java
JavaTM 2 SDK, Standard Edition, v 1.3 Beta Release is now
available from:
http://developer.java.sun.com/developer/earlyAccess/j2sdk13/
Brian
>Date: Thu, 2 Sep 1999 11:56:55 -0700
>From: Ananth <[EMAIL PROTECTED]>
>Subject: [JAVA2D] How to save the entire Frame as a gif or jpeg
>To: [EMAIL PROTECTED]
>
>Hi All,
>
>Is there any way using Java 2D API I could save a java.awt.Frame (including all
its sub-components)
>as a gif or jpeg? Basically I want to save what I see on screen as a gif or
jpeg file.
>
>I would greatly appreciate any pointer towards this.
>
>Thanks in advance,
>Ananth.
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA2D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".