清给出具体代码谢谢
解决方案 »
- 求报表控件 FastReports 4.10.5 以上的 版本
- 如何抓取这样的图片
- 代做毕业设计,有需要请与我联系(在线)
- 关于Indy 大家赐教 定有酬谢!
- 不同级别用户有不同的使用权限,请指教……
- 非常奇怪的问题,关于Control has no parent window,具体看内容
- 请问可以把摄像头里的视频实地嵌入在网页中吗?
- 怎么设置Form使其运行不随鼠标调整大小。谢谢
- 有谁写过打印机的驱动程序,请提供一些帮助.
- 日期计算问题
- 大家好 怎样替换制定.dll文件中的函数 使之先执行新函数然后再执行.dll 中的 一定给分哪怕只有一人
- 我搜集的几十个常用的VCL组件(包),谁要的话与我联系巴!
const
ErrorDescription: array[TGIFError] of String = ('None',
'Operation Cancelled',
'Internal Error',
'Invalid File Format',
'Image contains too many Colors (>256)',
'Index out of Bounds',
'Windows GDI Error',
'File not Found',
'Resource not Found');
var
GIF: TGIFImage;
Success: Boolean;
Bitmap: TBitmap;
begin
GIF := TGIFImage.Create(nil);
try
Success := GIF.LoadFromFile(editInput.Text); if Success then begin
{ There are 2 ways to do this: } { 1st Method:
GIF.Bitmap.SaveToFile(editOutput.Text);
} { 2nd Method: }
Bitmap := TBitmap.Create;
try
Bitmap.Assign(GIF); { or Bitmap.Assign(GIF.Bitmap); }
{ Now you're free to manipulate Bitmap before saving it... }
Bitmap.SaveToFile(editOutput.Text);
finally
Bitmap.Free;
end;
ShowMessage('GIF Converted. Success!');
end
else begin
ShowMessage(Format('Load Failed. Error Code = %d [%s]',
[Ord(GIF.LastError), ErrorDescription[GIF.LastError]]));
end;
finally
GIF.Free;
end;
end;