I am working on Windows Forms Applications, i have loaded an image into a pictureBox. I want to know if it's possible to move origin of image and bring it back to the center.
You could snap an area of the image and display this instead. This could look as follows:
var nX = bmpOriginalImage.Width / 2;
var nY = bmpOriginalImage.Height / 2;
var nWidth = bmpOriginalImage.Width - nX;
var nHeight = bmpOriginalImage.Height - nY;
var rect = new Rectangle(nX, nY, nWidth, nHeight);
var bmpSnapImage = bmpOriginalImage.Clone(rect, bmpOriginalImage.PixelFormat);
m_pbxPictureBox.Image = bmpSnapImage;