小编oto*_*ori的帖子

giflib I/O 回调

我目前正在尝试在通用图像解码/编码库中实现 gif 支持。在那里,我们为 fwrite 和 fread 定义了回调函数,以使其更加通用。

对于 gif 实现,我尝试使用 giflib。现在我想知道是否有可能设置自定义 I/O 回调。

DGifOpen ( void *userPointer, InputFunc *func) 
Run Code Online (Sandbox Code Playgroud)

正在将输入处理函数作为参数,但我无法从文档中找出该功能。它只是指源头,它只说:

/* func type to read gif data from arbitrary sources (TVT) */
typedef int (*InputFunc) (GifFileType *, GifByteType *, int);
Run Code Online (Sandbox Code Playgroud)

我的问题是,这个函数是否用于自定义文件读取(以及如果、如何),或者 giflib 是否未设计为与回调一起使用。

c callback gif

2
推荐指数
1
解决办法
595
查看次数

标签 统计

c ×1

callback ×1

gif ×1