I need an example of how to access the R,G, B, and A pixels in a surface after locking the surface. I need to be able to read and write them as quickly as possible.
I have tried
I have also tried
Dim Pic As LockedData = surfaceOld.Lock(LockFlags.Wait)
but I do not know how to get the data from it. I can get the following INFORMATION but it does not seem to be of any use:
'Dim A As String = Pic.ToString()
'Dim B As String = Pic.Height.ToString
'Dim C As String = Pic.Pitch.ToString
'Dim D As String = Pic.RGBBitCount.ToString
'Dim E As String = Pic.Width.ToString
If I could get a 1-dimensional array of bytes, I know how to use pitch to get to a new scan line.
I also need to know how to find the pixelformat so I can manipulate the colors.