A new Crop() method has been added for bitmaps, allowing a loaded bitmap to be cropped to the desired size. The latest Phantom has this function, but the documentation does not list it so I wanted to add a note about it here.
The syntax is:
- Code: Select all
void bitmap.Crop(int startX, startY, int Width, int Height);
where,
- Code: Select all
int startX - The zero-based starting x-pixel position, from the left hand side of the bitmap
int startY - The zero-based starting y-pixel position, from the bottom of the bitmap
int Width - The width, in pixels, of the crop
int Height - The height, in pixels, of the crop
A usage example is below:
- Code: Select all
bitmap b = w.CaptureBitmap();
b.Crop(10, 10, 100, 100);
b.Save("Cropped.bmp");
There have also been some bug fixes related to bitmap capture and searching, also available in the latest build available for download.
-John