'*************************translate() subroutine********************* ' ' purpose: takes the data computed by sobel and reverses it so it ' is in .bmp format and then displays the result in a ' picturebox control ' ' input: SobelData array ' ' output: datab2 array ' image on the screen ' '******************************************************************** Sub translate() Dim p As Long Dim i As Integer Dim j As Integer p = 57599 For j = 0 To picHEIGHT - 1 For i = picWIDTH - 1 To 0 Step -1 datab2(p - 2) = SobelData(i, j) datab2(p - 1) = SobelData(i, j) datab2(p) = SobelData(i, j) p = p - 3 Next i Next j Call RtlMoveMemory(VarPtr(datab1(54)), VarPtr(datab2(0)), 57600) Call DisplayImage(Picture4.hwnd) End Sub