19,468
社区成员
发帖
与我相关
我的任务
分享
Dim Flag(16777215) As Byte '16777215 'Green数组
BytePerPixel = IIf(m_PixelFormat = PixelFormat24bppRGB, 3, 4)
For Y = 0 To m_Height - 1
Speed = Y * m_Stride
For X = 0 To m_Width - 1
Index = ImageData(Speed) + ImageData(Speed + 1) * 256& + ImageData(Speed + 2) * 65536
If Flag(Index) = 0 Then
Flag(Index) = 1
Count = Count + 1
End If
Speed = Speed + BytePerPixel
Next
Next