| 发表于:2007-06-29 11:36:441楼 得分:50 |
我一般用的是这些,自己凑出来的式子,和ps的效果差不多 public function adjustbrightnessandcontrast(brightness as long, contrast as long) as boolean dim i as long, j as long dim speed(255) as byte, temp as long if contrast > 100 then contrast = 100 if contrast < -100 then contrast = -100 for i = 0 to 255 if contrast > 0 then temp = (i - 127) * contrast * 0.05 + i else temp = (i - 127) * contrast * 0.01 + i end if temp = temp + brightness if temp < 0 then temp = 0 if temp > 255 then temp = 255 speed(i) = temp next adjustbrightnessandcontrast = mapconvert(speed, r_g_b) end function 效果可从http://www.vbgood.com/viewthread.php?tid=53287&extra=page%3d1&page=4下载 | | |
|