Move Image in PictureBox some x and some y distance
I have the code below which retrieve image from a webserver and display in a pictureBox. However, it is some x and some y distance misaligned. How can I do the adjustment for the offset for the x and y distances, before it is displayed to the pictureBox? thanks.
public void RetrieveImage_Left()
{
Bitmap bitmap1;
var request = WebRequest.Create("http://192.168.2.10/image.cgi?img=curr.raw&type=1&scale=1&bits=8");
try
{
using (var response = request.GetResponse())
using (var stream = response.GetResponseStream())
{
bitmap1 = (Bitmap)Bitmap.FromStream(stream);
bitmap1.RotateFlip(RotateFlipType.Rotate180FlipNone);
// need some translation of x and y offset distances...
// any function that can do the translation???
pictureBox.Image = bitmap1;
}
}
catch (Exception e)
{
MessageBox.Show(e.ToString(), "Unable to connect to Remote Server for Right Scanner");
}
}