Let us talk about how to make the filters in a bitmap...(50分)

  • 主题发起人 主题发起人 kerry
  • 开始时间 开始时间
K

kerry

Unregistered / Unconfirmed
GUEST, unregistred user!
grayscale : pixel[m,n] := pixel[m,n] div 64 * 64

emboss : pixel[m,n] := pixel[m,n] - pixel[m-1,n] + k (u can change the value of k just u like)
 
能不能说清楚一点,或者用图形处理软件搞定
 
I give the example and welcome people talk about other filter


var a : Tbitmap;
b ,c : integer;
begin
a := Tbitmap.create;
a.loadfromfile(filename);
for b := 1 to a.height do
for c := 1 to a.width do
a.pixels[b,c] := (a.pixels[b,c] div 64) * 64;
end;
 
最后一句有错:
应是:a.canvas.pixels[b,c]:=(a.canvas[b,c] div 64)*64;
 
thanks,and how to do other filters ,who can teach me
 
接受答案了.
 
后退
顶部