TypeLib Xojo support Plugin

RawBitmap.Crop Method

Crops the image, returning a new RawBitmap with the result or nil if no parts of the image were within the Crop parameters.

Crop(
   x as Integer,
   y as Integer,
   width as Integer,
   height as Integer) as RawBitmap

Parameters

x
The x location where to start the crop. Note negative value is also valid here.
y
The y location where to start the crop. The x location where to start the crop.
width
The desired width of the cropped image.
height
The desired height of the cropped image.

Returns

RawBitmap
The copped image or nil if the requested crop zone would have no pixels.

Remarks

This function can return nil if no parts of the croup range were within the image.

This function can return lesser width or lesser height than requested, if parts of the requested area were outside of the source image.

See Also

RawBitmap Class