简体   繁体   中英

Resizing animated GIF with GIFDecoder.class.php will cause transparency problems

I need to resize animated GIF in PHP without ImageMagick. I am using the latest GIFDecoder and GIFEncoder classes from PHPclasses. When I extract each frame from the GIF, I get blotches of transparent areas on all the frames but the first one, even though the GIF is not transparent at all. Even putting them back together does not work. I have tried other files but still have the same problem.

The original

原本的

How it turned out

结果如何

Individual frames

个别帧

If there are other solutions to resizing animated GIF please tell me, too. Thanks!

I would recomment using ImageMagick . It's way faster and more powerfull than any custom coded PHP class.

Please take a look at this thread . The top answer even offers an alternative solution, if you have no access to ImageMagick on your server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM