gifinfo.cpp ( File view )

  • By 2010-10-11
  • View(s):5
  • Download(s):0
  • Point(s): 1
			#include "gif89a.h"
void main(int argc,char **argv)
{
	LPCGLOBAL_INFO gi;
	LPCFRAME fm;
	if(argc != 2)
	{
	cout<<"Usage: gifinfo filename"<<endl;
		return;
	
}
	CGif89a gif(argv[1],FALSE);
	if(!gif)
	{
	cout<<"find error!"<<endl;
		return;
	
}
	cout<<"GIF文件信息提取器 版本1.0 作者:陈鹏"<<endl;
	cout<<"版本="<<gif.getVer()<<endl;
	gi = gif.getGlobalInfo();
	cout<<"逻辑屏幕宽度="<<gi->scrWidth<<endl;
	cout<<"逻辑屏幕高度="<<gi->scrHeight<<endl;
	cout<<"图象帧数="<<gi->frames<<endl;
	if(gi->gFlag)
	{
	cout<<"全局调色板=有"<<endl;
		cout<<"全局调色板入口数="<<gi->gSize<<endl;
		if(gi->gSort)
			cout<<"全局调色板是否按优先排序=是"<<endl;
		else
			cout<<"全局调色板是否按优先排序=否"<<endl;
	
}
	else
		cout<<"全局调色板=无"<<endl;
	for(UINT i=0;i<gi->frames;i++)
	{
	fm = gif.getNextFrame();
		if(fm == NULL)
		{
	cout<<"find error!"<<endl;
			return;
		
}
		cout<<"第"<<i+1<<"帧"<<endl;
		cout<<"图像宽度="<<fm->imageWidth<<endl;
		cout<<"图像高度="<<fm->imageHeight<<endl;
		cout<<"图象左上角X坐标="<<fm->imageLPos<<endl;
		cout<<"图象左上角Y坐标="<<fm->imageTPos<<endl;
		if(fm->interlaceFlag)
			cout<<"数据是否交错=是"<<endl;
		else
			cout<<"数据是否交错=否"<<endl;
		if(fm->lFlag)
		{
	cout<<"是否有局部调色板=有"<<endl;
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
gif89a.cpp13.19 kB10-23-00|12:42
gif89a.doc281.50 kB10-10-00|20:22
gif89a.h1.64 kB10-17-00|12:43
gifinfo.cpp1.84 kB10-18-00|17:04
gifinfo.exe52.00 kB10-23-00|12:42
lzw.doc42.50 kB10-13-00|20:11
...
Sponsored links

gifinfo.cpp (74.57 kB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D