代码搜索结果
找到约 73,884 项符合
Image 的代码
e849. showing an image in a tool tip.txt
A tool tip can show simple HTML tags when surrounded by the tags and
e991. inserting an image into a jtextpane component.txt
try {
// Get the text pane's document
JTextPane textPane = new JTextPane();
StyledDocument doc = (StyledDocument)textPane.getDocument();
// The image must fir
e663. getting the transparent pixel and number of colors used in a gif image.txt
A IndexColorModel is used to represent the color table of a GIF image.
// Get GIF image
Image image = new ImageIcon("image.gif").getImage();
// Get the color model; this method i
e661. determining if an image has transparent pixels.txt
// This method returns true if the specified image has transparent pixels
public static boolean hasAlpha(Image image) {
// If buffered image, the color model is readily available
e666. creating a buffered image.txt
A buffered image is a type of image whose pixels can be modified. For example, you can draw on a buffered image and then draw the resulting buffered image on the screen or save it to a file. A buffere
e665. filtering the rgb values in an image.txt
This example demonstrates how to create a filter that can modify any of the RGB pixel values in an image.
// This filter removes all but the red values in an image
class GetRedFilter extend
e664. getting a sub-image of an image.txt
// From an Image
image = createImage(new FilteredImageSource(image.getSource(), new CropImageFilter(x, y, w, h)));
// From a BufferedImage
bufferedImage = bufferedImage.getSubimag
e638. getting and setting an image on the system clipboard.txt
// If an image is on the system clipboard, this method returns it;
// otherwise it returns null.
public static Image getClipboard() {
Transferable t = Toolkit.getDefaultToolkit().ge
e595. drawing an image.txt
See also e575 The Quintessential Drawing Program and e594 Reading an Image or Icon from a File.
public void paint(Graphics g) {
// Draw an Image object
int x = 0;
int
e660. creating an image from an array of color-indexed pixel values.txt
This example demonstrates how to convert a byte array of pixel values that are indices to a color table into an Image. In particular, the example generates the Mandelbrot set in a byte buffer and uses