 y) = 0 ' transparent
              bDib(x, y) = 0
              bDib(x + 1, y) = 0
              bDib(x + 2, y) = 0
         Next y
      Next x
        
    ' Clear the temporary array descriptor
    ' (This does not appear to be necessary, but
    ' for safety do it anyway)
    CopyMemory ByVal VarPtrArray(bDib), 0&amp;, 4
   
End Sub
Public Sub RandomiseBits( _
        Optional ByVal bGray As Boolean = False _
    )
Dim bDib() As Byte
Dim x As Long, y As Long
Dim lC As Long
Dim tSA As SAFEARRAY2D
    
 