关于网友提出的“ 求大神指点,如何利用giflib将一组连续的图像帧生成gif文件,图像帧已经经过了放缩”问题疑问,本网通过在网上对“ 求大神指点,如何利用giflib将一组连续的图像帧生成gif文件,图像帧已经经过了放缩”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: 求大神指点,如何利用giflib将一组连续的图像帧生成gif文件,图像帧已经经过了放缩描述:
giflib生成gif文件
如题。。。。。。。。。。。。。。。。。。。解决方案1:
Encoding (egif_lib.c)
The high-level function
int EGifSpew(GifFileType *GifFile)
writes a complete (possibly multi-image) GIF file to the indicated file handle from in-core allocated structures created by a previous DGifSlurp() or equivalent operations. Its argument is a GIF file descriptor, which imnplicitly points to storage previously allocated by DGifSlurp().
The file is written with a GIF87 stamp unless it contains one of the four special extension blocks defined in GIF89, in which case it is written with a GIF89 stamp.
EGifSpew() finishes by closing the GIF (writing a termination record to it) and deallocating the associated storage.
You can write to a GIF file through a function hook. Initialize with
GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *ErrorCode)
and see the library header file for the type of OutputFunc.
There is also a set of deprecated functions for sequential I/O, described in a later section.
不知道是不是这块?
http://giflib.sourceforge.net/gif_lib.html#idm46571690348944
你研究研究给我们分享一下
参考GIF编码一节 GifEncoder.cs