高手们,我做了一个摄像头采集图片的程序,关键是用户要求能在采集的图片上进行简单的操作,其中一个很关键的是要能在图片上添加文字,以及符号(如打个“√”),怎么解决,谢谢大家!
解决方案 »
- ACCESS数据库的备份问题
- 转让一张29号 上海到南昌 L77
- 请问FORMCONTAINER控件哪里有下载?
- 高分求qreport源码及相关资料。
- 我是用mdi界面,我打开一个mdichild的form时,我不想让用户还能去其它界面上进行操作,怎么做啊,我把formstyle设为dialog好象也不行
- 太慢了了,如何提速??
- 请问如何使得在WINDOWS 9X下按SHIFT不会跳过启动运行的程序
- ?????怎么定义一个动态数组常量??????????
- DELPHI select 返回结果所用的时间
- 请问哪位大虾用过TVCLUnzip和TwwDBGrid控件?
- 有关窗体显示问题,看上去容易,挑战性很强,你敢来吗?
- 高手讨论----------------------句柄
然后再贴上即可
ImageMoney->Canvas->Pen->Color=clYellow;
ImageMoney->Canvas->Font->Color =clYellow;
ImageMoney->Canvas->Font->Name ='宋体';
ImageMoney->Canvas->Font->Size =14;
ImageMoney->Canvas->Font->Height=21;
ImageMoney->Canvas->Font->Style =TFontStyles()<< fsBold ;
ImageMoney->Canvas->Brush->Color =clYellow;
ImageMoney->Canvas->Brush->Style =bsClear;
ImageMoney->Canvas->TextOutA(15,15,"要输出的文字"); 把->换成 .
ImageMoney是图片控件
image .CopyMode =cmMergePaint;//cmPatInvert 试一下 我记不清楚了,不行的画在help中输入刚才这个词,找到copymode 看一下,意思是用xor把原来的地方的土重画一遍 把原来的编程透明
Bmp:=TBitmap.Create();
try
try
if not SDKV_CaptureImage(Bmp) then begin //读入录像截图
MessageBox(Application.Handle,pchar('Can not capture image!'),pchar(Application.Title),MB_ICONWARNING);
exit;
end;
//设字体透明
SetBKMode(Bmp.Canvas.Handle,TRANSPARENT);
//写时间
Bmp.Canvas.Font.Color := clBlack;
Bmp.Canvas.TextOut(11,3,DateToStr(now)+' '+Timetostr(time));
Bmp.Canvas.Font.Color := clWhite;
Bmp.Canvas.TextOut(10,2,DateToStr(now)+' '+Timetostr(time));
Image2.Picture.Bitmap.Assign(Bmp); //读Bmp至 Image2
except
MessageBox(Application.Handle,pchar('Error when export image!'),pchar(Application.Title),MB_ICONERROR);
end;
finally
Bmp.Free;
end; //>>>>>>>>>>>>>>>>>>读入录像截图写时间END>>>>>>>>>>>>>>>>>>
function SDKV_CaptureImage(Bmp:TBitmap):Boolean;
//capture the image into bmp
//2003.01.10
var
BmpFileName:String;
begin
Result:=false;
try
if FCardIndex<0 then
exit;
BmpFileName:=ExtractFilePath(Application.ExeName)+'Capture.bmp';
if FileExists(BmpFileName) then begin
if not DeleteFile(BmpFileName) then
exit;
end;
DSStream_SaveToBmpFile(0,pchar(BmpFileName));
if not FileExists(BmpFileName) then
exit;
Bmp.LoadFromFile(BmpFileName);
Result:=true;
except
end;
end;