Home  >  Article  >  Backend Development  >  Excuse me, I get the information of the first frame from the gif image and get the resource ID. How can I use it to generate the image?

Excuse me, I get the information of the first frame from the gif image and get the resource ID. How can I use it to generate the image?

WBOY
WBOYOriginal
2016-12-01 00:57:091513browse

<code>$gfe = new Gif();//gif类
$gfe->extract($img['saveDir'].'/'.$img['fileName']);
$frames = $gfe->getFrames();//帧信息

print_r($frames['0']['image']);die;//Resource id #17

用这个资源怎么生成图片</code>

Reply content:

<code>$gfe = new Gif();//gif类
$gfe->extract($img['saveDir'].'/'.$img['fileName']);
$frames = $gfe->getFrames();//帧信息

print_r($frames['0']['image']);die;//Resource id #17

用这个资源怎么生成图片</code>

Can you post the API? I haven’t seen this class before, but I think it has a built-in API in theory.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn