我想把AVI里读出的每个图都放到image里显示出来,然后取image的x,y的RGB存到数据库里
我搜了一下论坛,找到http://community.csdn.net/Expert/topic/5480/5480539.xml?temp=.6559412是把AVI转到BMP的,可写的是C语言,我是初学者,不知怎么转成Delphi代码,有哥哥姐姐,叔叔帮帮忙吗?很急!!
我搜了一下论坛,找到http://community.csdn.net/Expert/topic/5480/5480539.xml?temp=.6559412是把AVI转到BMP的,可写的是C语言,我是初学者,不知怎么转成Delphi代码,有哥哥姐姐,叔叔帮帮忙吗?很急!!
解决方案 »
- delphi里面如何弹出文本文件
- Tchart中动态创建的series,无法动态删除,请帮忙看看为什么。
- IdFTP的目录必须用parse或load才能放进directorylisting.data里吗?
- help!!!help!!!help!!!
- 当多表关联时怎样完成更新??紧急求救?!!!!
- 怎样取当前日期?
- HELP,一个关于子FORM的问题
- ADOTable的 LookupKeyFields,LookupResultField,KeyFields怎么用?
- 如何在QuicRep控制一页中的行数(数据来自数据集),如何为每页中的行写入一个自增长序号?
- 请问怎样用NMPOP3和NMSMTP收发MIME的HTML格式邮件
- 上机评分代码怎么写!!!快帮帮我
- 关于Tsocketconnection连接问题
procedure TForm1.ShowVideoFrame(SampleIndex: Integer);
var
lpBi:PBitmapInfoHeader;
begin if FGetVideoFrame=nil then exit; lpBi:=AVIStreamGetFrame(FGetVideoFrame,SampleIndex);
if assigned(lpBi) then
begin
VideoPlayer1.DrawFrame(lpBI^,nil);
end; FVideoSampleIndex:=SampleIndex;
end;
这里把VideoPlayer1.DrawFrame的代码放上
Procedure TVideoPlayer.DrawFrame(var bi:TBitmapInfoHeader;Bits:Pointer);
var
L,T,W,H:integer;
i,j:integer;
RGN:HRGN;
begin if Visible=FALSE then exit; DrawDIBHandleNeeded;
DrawCanvasNeeded; if (DrawDIBHandleAllocated=FALSE) OR (DrawCanvasAllocated=FALSE) then
exit;
GetDrawRect(L,T,W,H,bi.biWidth,bi.biHeight);
if FAlignment = fa_TileShow then
begin
RGN:=CreateRectRgn(0,0,Width,Height);
SelectClipRgn(DrawCanvas,RGN); i:=T;
while i < Height do
begin
j:=L;
while j< Width do
begin
try
DrawDibDraw(
FDrawDIBH,DrawCanvas,j,i,W,H,
@bi,Bits,0,0,-1,-1,
DrawFlagsToDWord(FDrawFlags)
);
except
end;
inc(j,W);
end;
inc(i,H);
end; FPaintArea.Left := 0 ;
FPaintArea.Top := 0 ;
FPaintArea.Right := Width ;
FPaintArea.Bottom := Height ; DeleteObject(RGN);
end
else
begin try
DrawDibDraw(
FDrawDIBH,DrawCanvas,L,T,W,H,
@bi,Bits,0,0,-1,-1,
DrawFlagsToDWord(FDrawFlags)
);
except end; RGN:=CreateRectRgn(
FPaintArea.Left,
FPaintArea.Top,
FPaintArea.Right,
FPaintArea.Bottom
); SelectClipRgn(DrawCanvas,RGN); if ExcludeClipRect(DrawCanvas,L,T,L+W,T+H) <> NULLREGION then
begin
FillRect(DrawCanvas,FPaintArea,Brush.Handle);
end; FPaintArea.Left := L ;
FPaintArea.Top := T ;
FPaintArea.Right := L + W ;
FPaintArea.Bottom := T + H ; DeleteObject(RGN); end;
ReleaseDrawCanvas;end;