代码搜索结果
找到约 73,884 项符合
Image 的代码
e1037. returning an image in a servlet.txt
Home > List of Packages > javax.servlet [11 examples]
e1037. Returning an Image in a Servlet
This example returns to the requestor, an image read from a file:
// See also e1035 The Quintes
e694. reading an image from a file, inputstream, or url.txt
This example demonstrates how to use the javax.imageio package to read an image from a file, input stream, or URL. The example also demonstrates how to display the image on the screen.
GIF, PNG, and
e675. flipping a buffered image.txt
// To create a buffered image, see e666 Creating a Buffered Image
// Flip the image vertically
AffineTransform tx = AffineTransform.getScaleInstance(1, -1);
tx.translate(0, -image
e670. converting a buffered image to an image.txt
// This method returns an Image object from a buffered image
public static Image toImage(BufferedImage bufferedImage) {
return Toolkit.getDefaultToolkit().createImage(bufferedImage.getSo
e689. setting a description for image icons.txt
Image icons can be inserted in a variety of places such as in a text or tree component. You should set a description for image icons to help blind users.
ImageIcon icon = new ImageIcon("image.gi
e667. creating a buffered image from an image.txt
An Image object cannot be converted to a BufferedImage object. The closest equivalent is to create a buffered image and then draw the image on the buffered image. This example defines a method that do
e698. determining the format of an image in a file.txt
The javax.imageio package can determine the type of image in a file or input stream.
try {
// Get image format in a file
File file = new File("image.gif");
String form
e594. reading an image or icon from a file.txt
See also e595 Drawing an Image.
// This call returns immediately and pixels are loaded in the background
Image image = Toolkit.getDefaultToolkit().getImage("image.gif");
int width = im
e557. loading and drawing an image in an applet.txt
See also e551 The Quintessential Applet.
Image image;
public void init() {
// Load image
image = getImage(getDocumentBase(), "http://hostname/image.gif");
}
publ
image.h
/*
* -*- Mode: ANSI C -*-
* $Id: image.h,v 1.3 1996/08/16 17:23:25 fernande Exp $
* $Source: /sgi.acct/sweldens/cvs/liftpack/include/image.h,v $
* Author: Gabriel Fernandez, Senthil Periaswamy