Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- Bmp: TBitmap;
- x1, y1: Integer;
- px: PRGBQuad;
- begin
- Bmp := TBitmap.Create;
- try
- Bmp.Width := Image1.Width;
- Bmp.Height := Image1.Height;
- Bmp.PixelFormat := pf32bit;
- Bmp.HandleType := bmDIB;
- Bmp.IgnorePalette := True;
- for y1 := 0 to Bmp.Height - 1 do
- begin
- px := Bmp.ScanLine[y1];
- for x1 := 0 to Bmp.Width - 1 do
- begin
- px.rgbBlue := 0;
- px.rgbGreen := 0;
- px.rgbRed := 0;
- px.rgbReserved := 0; // fully transparent
- Inc(px);
- end;
- end;
- //...
- finally
- Bmp.Free;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement