Arsip: Mencerahkan Image

 
user image
more 13 years ago

supermuam

para master delphi saya nemu script ini di about.com tapi ada yg eror tolong kasih petunjuknya, terimakasih
procedure TForm1.ScrollBar1Change(Sender: TObject);
var
p0: byte array; // lokasi eror saya bingung maksudnya
r,g,b,x,y,Amount: Integer;
bw:tbitmap;
begin
bw:=TBitmap.Create;
bw.LoadFromFile('c:\1.bmp');
Amount:=ScrollBar1.Position2;
for y:=0 to image1.Height-1 do begin
p0:=bw.ScanLine[y];
for x:=0 to image1.Width-1 do
begin
r:=p0[x 3];
g:=p0[x3+1];
b:=p0[x 3+2];
p0[x3]:=IntToByte(r+((255-r) Amount)div 255);
p0[x3+1]:=IntToByte(g+((255-g) Amount)div 255);
p0[x3+2]:=IntToByte(b+((255-b) Amount)div 255);
end;
end;
Image1.Picture.Bitmap:=bw;

end;
user image
more 13 years ago

madi

p0: PByteArray;
user image
more 13 years ago

supermuam

makasih bang madi. masalah terselesaikan.
user image
more 13 years ago

DelphiExpert

Mantap :)
more ...
  • Pages:
  • 1
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com