解决方案 »
- 50 分求助 Dephi 5调用 C# DLL 编译器错误:Type 'Byte' is not yet completely defined
- Delphi报表问题
- 关于ENTER键代替TAB键的问题,不难也不简单
- WM_NCMOUSEMOVE 消息中,如何判断 是否在 标题栏??
- 怎样得到一个文件夹的大小?马上揭帖!
- ACD See Photo Enhance软件的图象处理速度为什么这么快呢?
- 急!!!!循环问题!
- 各位前辈们,给我提示吧!!有分为谢!
- 对了,怎么把数据库里的JPEG图片放在TIMAGE控件里显示呢?
- 急需:解决:corrupt table-index-header-file:c\*****\?????.db的修复工具
- delphi我想实现这个功能
- 在QUICKREP中如何设置自动增加的序号
begin
VideoCap1.DriverIndex:=0;
VideoCap1.DriverOpen:=True;
VideoCap1.VideoPreview:=True;
end;procedure TForm1.Button1Click(Sender: TObject);
Var
jpeg: TJPEGImage;
bmp: TBitmap;
strfilename:String;
begin
image1.Refresh;
inherited;
strfilename:=extractfilepath(Application.ExeName);
begin
if not VideoCap1.SaveAsDIB then
begin
ShowMessage('拍摄照片失败');
Abort;
end;
bmp:= TBitmap.Create;
try
bmp.LoadFromFile(strfilename+ 'Capture.bmp' );
jpeg:= TJPEGImage.Create;
try
jpeg.Assign(bmp);
Image1.Picture.Graphic:=jpeg;
finally
jpeg.free;
end;
finally
bmp.free;
end;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
VideoCap1.DlgVFormat;
end;procedure TForm1.Button3Click(Sender: TObject);
begin
VideoCap1.DlgVSource;
end;procedure TForm1.Button4Click(Sender: TObject);
begin
if savedialog1.Execute then
image1.Picture.SaveToFile(savedialog1.FileName);
end;
而且我在那控件上我也没找到设置图片大小的方法和功能,最多就是获取到图片对象 然后设置一下现在我就在想,我先把文件保存下来为图片A
SendMessage(hWndC,WM_CAP_SAVEDIB,0,longint(pchar('c:\\test.bmp')));
然后读取图片,获得对象,然后设置一下下,保存为图片B
最后把图片A删除 ,这也是一种办法,也许是最笨的办法...非常谢谢shuaialang的回复不过我希望还是能有什么办法设置一下BITMAPINFO
因为我的一个C#扫描仪控件也能用到.
再次希望大虾来给点意见