锐化,没通过,溢出。
- Case 锐化
- For ix = 1 To iWidth - 1
- For iy = 1 To iHeight - 1
- bits(0, ix, iy) = (bits(0, ix, iy + 1) + bits(0, ix + 1, iy) + bits(0, ix + 1, iy + 1)) * 1.3 / 3
- bits(1, ix, iy) = (bits(1, ix, iy + 1) + bits(1, ix + 1, iy) + bits(1, ix + 1, iy + 1)) * 1.3 / 3
- bits(2, ix, iy) = (bits(2, ix, iy + 1) + bits(2, ix + 1, iy) + bits(2, ix + 1, iy + 1)) * 1.3 / 3
-
- If bits(0, ix, iy) < 0 Then bits(0, ix, iy) = 0
- If bits(0, ix, iy) > 255 Then bits(0, ix, iy) = 255
- If bits(1, ix, iy) < 0 Then bits(1, ix, iy) = 0
- If bits(1, ix, iy) > 255 Then bits(1, ix, iy) = 255
- If bits(2, ix, iy) < 0 Then bits(2, ix, iy) = 0
- If bits(2, ix, iy) > 255 Then bits(2, ix, iy) = 255
- Next
- Next
复制代码
别的设置都和其他没什么区别。请教,代码哪里有问题? |