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
Release: 2023-03-02 09:12:01
Original
1547 people have browsed it

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

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

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

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>
Copy after login
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!