The Java Developers Almanac 1.4


Order this book from Amazon.

   
Home > List of Packages > java.awt.image  [21 examples] > Images  [6 examples]

e664. Getting a Sub-Image of an Image

    // From an Image
    image = createImage(new FilteredImageSource(image.getSource(), new CropImageFilter(x, y, w, h)));
    
    // From a BufferedImage
    bufferedImage = bufferedImage.getSubimage(x, y, w, h);

 Related Examples
e660. Creating an Image from an Array of Color-Indexed Pixel Values
e661. Determining If an Image Has Transparent Pixels
e662. Getting the Color Model of an Image
e663. Getting the Transparent Pixel and Number of Colors Used in a GIF Image
e665. Filtering the RGB Values in an Image

See also: Buffered Images    Effects    Volatile Images   


© 2002 Addison-Wesley.