ImageEn, unit iexBitmaps

TIEBitmap.Crop

TIEBitmap.Crop


Declaration

procedure Crop(x1, y1, x2, y2 : Integer; FillColor: TColor = clWhite);
procedure Crop(Rect : TRect; FillColor: TColor = clWhite);


Description

Replace the current image with that within the specified rectangle (i.e. keep only the specified region).

Note: Negative or out-of-range values will enlarge the image. FillColor will be used for the new areas


Example

// Crop the image at position, Top-Left: (20, 20), Bottom-right: (100, 100). The resulting image will be 80 x 80 pixels
IEBmp.Crop( 20, 20, 100, 100 );


See Also

- Resize
- CropAlpha
- Crop
- Global Image Methods