Part Of Image

Use the graphics objects DrawImage function, and give it a source rectangle(Look through the overloads to see the one you want)
 
The easiest way todo this is:

Code:
Dim b as New Bitmap("C:\test.bmp")
Dim b2 as Bitmap = b.Clone(new Rectangle(0, 0, 20, 20), b.PixelFormat)
b.Dispose

That will get 20x20 pixels from the top corner of the image :)


Dan
 
Back
Top