Реферат: Обработка изображений с использованием расширения процессора
end;//for
with P[j] do
begin
b := TrimReal(0, 255, tb);
g := TrimReal(0, 255, tg);
r := TrimReal(0, 255, tr);
end;
end;
Move(P[0], theRow[0], (High(theRow) + 1) * Sizeof(TPxlC));
end;
//GBlur - полное размытие картинки
procedure GBlur(theBitmap: TBitmap; radius: double; withSSE:boolean);
var
Row, Col: integer;
theRows: PPRows;
K: TKernel;
ACol: PRow;
P: PRow;
begin
if (theBitmap.HandleType <> bmDIB) or (theBitmap.PixelFormat <> pf24Bit) then
raise
exception.Create('GBlur может работать только с 24-битными изображениями');
if (withSSE) then MakeGaussianKernelSSE(K, radius, 255, 1)
else MakeGaussianKernel(K, radius, 255, 1);
GetMem(theRows, theBitmap.Height * SizeOf(PRow));
GetMm(ACol, theBitmap.Height * SizeOf(TPxlC));
frm_img.img_pbar.Max:=theBitmap.Height+theBitmap.Width+4;
//запись позиции данных изображения:
forRow := 0 totheBitmap.Height - 1 do