⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gif_extension.c

📁 ucOS 模拟环境
💻 C
字号:
//----------------------------------------------------------------------
// File Name :		gif_extension.c
// Project   :		gsm_gprs
// Module    :
// Memo      :
//                Author       Date       Description
//              -----------------------------------------------
//				  dts			  2004.3.10
//               
//----------------------------------------------------------------------

#include "gif_extension.h"
#include "gif_read.h"
extern uint		  *g_pointBuffer;
extern int*			  BgIndex;
extern                uchar* colormap;
static struct {
  char transpcolflag:1;
  char userinputflag:1;
  char dispmeth:3;
  char res:3;
  char delaytimehi;
  char delaytimelo;
  char transpcolindex;
} gifgce;

//====================================================================================
// Function Name:	Bool DoExtension(GIFParameter *ucGifParameter)
// Purpose      :	when a block of extension is found in a picture ,the function
//     			   will be called 
// Parameter    :	
// Return       :	
// Remarks      :	
// Change Log   :	
//                Author       Date       Description	
//              -----------------------------------------------	
//=====================================================================================
Bool DoExtension(GIFParameter *ucGifParameter)
{
	uint c;
	c = ReadByte();
	switch (c)
	{
	case GRAPHIC_CONTROL_EXTENSION:
		c = ReadByte();
		if(c <= 0)
			return FALSE;
		if (! readFromBuffer(4, (uchar*)(&gifgce)) )
			return FALSE;
		if (gifgce.transpcolflag)
				*BgIndex = gifgce.transpcolindex;
		c = ReadByte();
		if(*BgIndex != -1)
		{
			colormap[3*(*BgIndex)] = 255;
			colormap[3*(*BgIndex) + 1] = 255;
			colormap[3*(*BgIndex) + 2] = 255;
		}
		ucGifParameter->uReInfor->usDelayTime = gifgce.delaytimehi;

		break;
	case COMMENT_EXTENSION:
	case PLAIN_TEXT_EXTENSION:
	case APPLICATION_EXTENSION:
		 SkipDataBlocks ();
		 break;

	default:
		return FALSE;
		break;
	}
	return TRUE;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -