procedure Negativize(src, dest : TBitmap);
var X : integer;
pPix : ^Integer;
begin
if Src.PixelFormat <> pf32bit then
begin
Src.PixelFormat := pf32Bit;
Dest.PixelFormat := pf32Bit;
end;
Dest.Assign(Src);
pPix := Dest.ScanLine[Dest.Height-1];
for X := 0 to (Dest.Width*Dest.Height)-1 do
begin
pPix^ := $00FFFFFF and (not pPix^);
inc(pPix);
end;
end;