pixel = Picture2.Point(i, j) red = pixel Mod 256 green = (pixel And &HFF00FF00) / 256 blue = (pixel And &HFF0000) / 65536 red这里为什么要与256取余啊?后面的和16进制数先与后,为什么还要除以256和65534,与是取相应的位数 这个理解对吗? 请高手讲讲,谢谢了!!
type ColorByte B as byte G as byte R as byte A as byte end type type ColorLong ARGB as long end type dim cByte as colorbyte, cLong as colorLong clong=Picture2.Point(i, j) lset cbyte=clong with cbyte print .R, .G, .B end with