AVI2BMP,Gif2Bmp,Flash2Bmp(200分)

  • 主题发起人 主题发起人 zhaojinqiu
  • 开始时间 开始时间
Z

zhaojinqiu

Unregistered / Unconfirmed
GUEST, unregistred user!
求指点把AVI,gif,flash,按每一桢存成BMP图片或提取出数据的思路和办法.
PSD2BMP呢?
 
晕哦,请大家帮忙啊,有一种也好啊。。。
 
AVI to bmp:
http://www.swissdelphicenter.ch/torry/showcode.php?id=1180
 
从网上下载vfw32.pas,gifimage.pas,你就可以了。
 
//for all

unit ScrnCap;

interface
uses WinTypes, WinProcs, Forms, Controls, Classes, Graphics;

type
TScrnCap = class
private
{ Private declarations }
public
{ Public declarations }
function CaptureScreenRect( ARect: TRect ): TBitmap;
function CaptureScreen: TBitmap;
function CaptureClientImage( Control: TControl ): TBitmap;
function CaptureControlImage( Control: TControl ): TBitmap;
function CaptureWindowImage( Wnd: HWND ): TBitmap;
end;

implementation

{ Use this to capture a rectangle on the screen... }
function TScrnCap.CaptureScreenRect( ARect: TRect ): TBitmap; //TRect defines a rectangle.
var
ScreenDC: HDC; //device context (DC)
begin
Result := TBitmap.Create;
with Result, ARect do
begin
Width := Right - Left;
Height := Bottom - Top;
ScreenDC := GetDC( 0 );
try
BitBlt( Canvas.Handle, 0, 0, Width, Height, ScreenDC,
Left, Top, SRCCOPY );
finally
ReleaseDC( 0, ScreenDC );
end;
end;
end;

{ Use this to capture the entire screen... }
function TScrnCap.CaptureScreen: TBitmap;
begin
with Screen do
Result := CaptureScreenRect( Rect( 0, 0, Width, Height ));
end;

{ Use this to capture just the client area of a form or control... }
function TScrnCap.CaptureClientImage( Control: TControl ): TBitmap;
begin
with Control, Control.ClientOrigin do
Result := CaptureScreenRect( Bounds( X, Y, ClientWidth,
ClientHeight ));
end;

{ Use this to capture an entire form or control... }
function TScrnCap.CaptureControlImage( Control: TControl ): TBitmap;
begin
with Control do
if Parent = nil then
Result := CaptureScreenRect( Bounds( Left, Top, Width,
Height ))
else
with Parent.ClientToScreen( Point( Left, Top )) do
Result := CaptureScreenRect( Bounds( X, Y, Width,
Height ));
end;

{ Use this to capture an entire form or control paased as an API hWnd... }
function TScrnCap.CaptureWindowImage( Wnd: HWND ): TBitmap;
var
R: TRect;
begin
GetWindowRect(Wnd, R);
Result := CaptureScreenRect(R);
end;

end.
 
我有两个文件,怎么给你.
不过要到晚上,因为文件在家里.
 
s9705040@sina.com.
谢谢jianguobu
 
能不能也给我一个
我现在有急用
zbb1031@sina.com
给分也可以的
 
//gif2bmp
//========================
var
gif :TGifImage;
bmp :TBitMap;
begin
gif :=TGifImage.Create;
bmp :=TBitMap.Create;
gif.LoadFromFile('filename.gif');
bmp.Canvas.Draw(0,0,gif);
gif.Free;
bmp.SaveToFile('filename.bmp');
bmp.Free;
end;

var
gif :TGifImage;
bmp :TBitMap;
i:Integer;
begin
gif :=TGifImage.Create;
bmp :=TBitMap.Create;

gif.LoadFromFile('filename.gif');
bmp.Width := gif.Width;
bmp.Height := gif.Height;
for i:=0 to gif.Images.Count-1 do
begin
bmp.Canvas.Draw(0,0,gif.Images.Items.Image);
bmp.SaveToFile(inttostr(i)+'.bmp');
end;
gif.Free;
bmp.Free;
end;


 
To jianguobu:
能留个QQ吗?
yckxzjj@163.com[QQ:1917208]
 
去天空软件下载 视频叠加王 ,它里面有一个程序能将任何视频文件转换成BMP文件

http://www.skycn.com/soft/8851.html
 
网上不少
 
后退
顶部