hi
I am writting a program.
there is two picturebox in it.
one is containing a full image and another one is small one and should contain part of full image mouse points in big picturebox.
I just want to implement a zoom feature with fixed ratio that show part of image under mouse cursor in big picturbox into the small picturebox.
I just want a Bitmap exactly size of my small picturebox witch has the zoomed Image.
PS: I don’t want to use any additional libraries.
I don’t want to resize my pictureboxes’ sizes.
You can create a new
Bitmapof the desired size, callGraphics.FromImageto get aGraphicsobject that draws on it, then call theDrawImageoverload that takes two rectangles.This overload takes a portion of the source image to draw and the bounds in the target image to scale it to.