Fixed cFFmpegIPCamSource examples

Signed-off-by: Mikhail Grigorev <sleuthhound@gmail.com>
This commit is contained in:
Mikhail Grigorev 2014-09-29 16:56:29 +06:00
parent 375f213c0b
commit c2a3900539
2 changed files with 18 additions and 12 deletions

View File

@ -192,12 +192,15 @@ var
TW: Integer;
begin
Bmp := TBitmap.Create;
Bmp.SetSize(ocvView1.Width, ocvView1.Height);
Bmp.PixelFormat := pf24bit;
TW := Bmp.Canvas.TextWidth(Value);
Bmp.Canvas.TextOut((ocvView1.Width - TW) div 2, ocvView1.Height div 2, Value);
ocvView1.DrawImage(TocvImage.Create(Bmp));
Bmp.Free;
try
Bmp.SetSize(ocvView1.Width, ocvView1.Height);
Bmp.PixelFormat := pf24bit;
TW := Bmp.Canvas.TextWidth(Value);
Bmp.Canvas.TextOut((ocvView1.Width - TW) div 2, ocvView1.Height div 2, Value);
ocvView1.DrawImage(TocvImage.Create(Bmp));
finally
Bmp.Free;
end;
end;
end.

View File

@ -192,12 +192,15 @@ var
TW: Integer;
begin
Bmp := TBitmap.Create;
Bmp.SetSize(ocvView1.Width, ocvView1.Height);
Bmp.PixelFormat := pf24bit;
TW := Bmp.Canvas.TextWidth(Value);
Bmp.Canvas.TextOut((ocvView1.Width - TW) div 2, ocvView1.Height div 2, Value);
ocvView1.DrawImage(TocvImage.Create(Bmp));
Bmp.Free;
try
Bmp.SetSize(ocvView1.Width, ocvView1.Height);
Bmp.PixelFormat := pf24bit;
TW := Bmp.Canvas.TextWidth(Value);
Bmp.Canvas.TextOut((ocvView1.Width - TW) div 2, ocvView1.Height div 2, Value);
ocvView1.DrawImage(TocvImage.Create(Bmp));
finally
Bmp.Free;
end;
end;
end.