Java BufferedImage Clip subImage(BufferedImage image, int x, int y, int width, int height)

Here you can find the source of subImage(BufferedImage image, int x, int y, int width, int height)

Description

Gets a subImage.

License

Open Source License

Parameter

Parameter Description
image a parameter
x a parameter
y a parameter
width a parameter
height a parameter

Declaration

public static BufferedImage subImage(BufferedImage image, int x, int y, int width, int height) 

Method Source Code

//package com.java2s;
/*/*from   w w w. j  a  v  a 2  s  .c  o  m*/
 *    leola-live 
 *  see license.txt
 */

import java.awt.image.BufferedImage;

public class Main {
    /**
     * Gets a subImage.
     *
     * @param image
     * @param x
     * @param y
     * @param width
     * @param height
     * @return
     */
    public static BufferedImage subImage(BufferedImage image, int x, int y, int width, int height) {
        return image.getSubimage(x, y, width, height);
    }
}

Related

  1. clip(BufferedImage image, int[] ul, int[] lr)
  2. subimage(BufferedImage src, int x, int y, int w, int h)