Image.crop Method

Crops the image.

Syntax

public int crop(
    int x, 
    int y, 
    int w, 
    int h)

Run On

Client

Parameters

  • x
    Type: int
    The horizontal coordinate of the lower-left corner of the region that you want to crop.
  • y
    Type: int
    The vertical coordinate of the lower-left corner of the region that you want to crop.
  • w
    Type: int
    The width of the region that you want to crop from the point (x, y).
  • h
    Type: int
    The height of the region that you want to crop from the point (x, y).

Return Value

Type: int
0 indicates success; otherwise, failure.

See Also

Reference

Image Class