| java.lang.Object org.netbeans.jemmy.util.PNGEncoder
PNGEncoder | public class PNGEncoder extends Object (Code) | | This class allows to encode BufferedImage into B/W, greyscale or true color PNG
image format with maximum compression.
It also provides complete functionality for capturing full screen, part of
screen or single component, encoding and saving captured image info PNG file.
author: Adam Sotona version: 1.0 |
Method Summary | |
public static void | captureScreen(Rectangle rect, String fileName) Static method performing screen capture into PNG image format file with given fileName. | public static void | captureScreen(Rectangle rect, String fileName, byte mode) Static method performing screen capture into PNG image format file with given fileName. | public static void | captureScreen(Component comp, String fileName) Static method performing one component screen capture into PNG image format file with given fileName. | public static void | captureScreen(Component comp, String fileName, byte mode) Static method performing one component screen capture into PNG image format file with given fileName. | public static void | captureScreen(String fileName) Static method performing whole screen capture into PNG image format file with given fileName. | public static void | captureScreen(String fileName, byte mode) Static method performing whole screen capture into PNG image format file with given fileName. | public void | encode(BufferedImage image) main encoding method (stays blocked till encoding is finished). | void | write(int i) | void | write(byte b) |
BW_MODE | final public static byte BW_MODE(Code) | | black and white image mode.
|
COLOR_MODE | final public static byte COLOR_MODE(Code) | | full color image mode.
|
GREYSCALE_MODE | final public static byte GREYSCALE_MODE(Code) | | grey scale image mode.
|
PNGEncoder | public PNGEncoder(OutputStream out)(Code) | | public constructor of PNGEncoder class with greyscale mode by default.
Parameters: out - output stream for PNG image format to write into |
PNGEncoder | public PNGEncoder(OutputStream out, byte mode)(Code) | | public constructor of PNGEncoder class.
Parameters: out - output stream for PNG image format to write into Parameters: mode - BW_MODE, GREYSCALE_MODE or COLOR_MODE |
captureScreen | public static void captureScreen(Rectangle rect, String fileName)(Code) | | Static method performing screen capture into PNG image format file with given fileName.
Parameters: rect - Rectangle of screen to be captured Parameters: fileName - file name for screen capture PNG image file |
captureScreen | public static void captureScreen(Rectangle rect, String fileName, byte mode)(Code) | | Static method performing screen capture into PNG image format file with given fileName.
Parameters: rect - Rectangle of screen to be captured Parameters: mode - image color mode Parameters: fileName - file name for screen capture PNG image file |
captureScreen | public static void captureScreen(Component comp, String fileName)(Code) | | Static method performing one component screen capture into PNG image format file with given fileName.
Parameters: comp - Component to be captured Parameters: fileName - String image target filename |
captureScreen | public static void captureScreen(Component comp, String fileName, byte mode)(Code) | | Static method performing one component screen capture into PNG image format file with given fileName.
Parameters: comp - Component to be captured Parameters: fileName - String image target filename Parameters: mode - image color mode |
captureScreen | public static void captureScreen(String fileName)(Code) | | Static method performing whole screen capture into PNG image format file with given fileName.
Parameters: fileName - String image target filename |
captureScreen | public static void captureScreen(String fileName, byte mode)(Code) | | Static method performing whole screen capture into PNG image format file with given fileName.
Parameters: fileName - String image target filename Parameters: mode - image color mode |
encode | public void encode(BufferedImage image) throws IOException(Code) | | main encoding method (stays blocked till encoding is finished).
Parameters: image - BufferedImage to encode throws: IOException - IOException |
|
|