title: Drawing.Line on bitmap with Image LockBits
body: <p>I have 20 frame per sec. and I draw some line on each frame, I am getting lines without problem but background Image stucks often. Randomly I get 10 frame same Image but lines look fine.</p>
  
  <pre><code>if (cizik == null)
  {
  BitmapData imageData = CloneOrj2.LockBits(new Rectangle(0, 0, CloneOrj2.Width, CloneOrj2.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
  UnmanagedImage tmp = new UnmanagedImage(imageData);
  cizik = UnmanagedImage.Create(CloneOrj2.Width, CloneOrj2.Height, PixelFormat.Format24bppRgb);
  tmp.Copy(cizik);
  Drawing.Line(cizik, new IntPoint(XX, XX), new IntPoint(XX, XX), System.Drawing.Color.Yellow);
  }
  else
  { 
  BitmapData imageData = CloneOrj2.LockBits(new Rectangle(0, 0, CloneOrj2.Width, CloneOrj2.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
  UnmanagedImage tmp = new UnmanagedImage(imageData);
  Drawing.Line(tmp, new IntPoint(XX, XX), new IntPoint(XX, XX), System.Drawing.Color.Yellow);
  cizik = UnmanagedImage.Create(CloneOrj2.Width, CloneOrj2.Height, PixelFormat.Format24bppRgb);
  tmp.Copy(cizik);
  }
  
  DrawScreenActual.Image = (System.Drawing.Image)cizik.ToManagedImage().Clone();
  </code></pre>
  
  <p>thanks for your help!</p>