TAN WhoAMI

TAN WhoAMI

  • NA
  • 291
  • 0

Move Image in PictureBox some x and some y distance

Dec 15 2014 6:21 AM
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");
  }
  }


Answers (2)