leafo / magick

Lua bindings to ImageMagick for LuaJIT using FFI
401 stars 79 forks source link

Use first frame from GIF instead last one #22

Closed maxgorovenko closed 8 years ago

maxgorovenko commented 8 years ago

I have problem with GIF thumbnailing. Now 'magick' use static image as thumbnail for gif, ok. But it takes the last frame, and sometimes its broken.

There are 2 attached files. The first one is a screenshot of the original last frame and theresult. The second attach is original gif file. git_thumb 064ff87673c5ae3dc26fbaacfb722d32

antonrubtsov commented 8 years ago

+1

karai17 commented 8 years ago

+1

leafo commented 8 years ago

the coalesce method now exists, but I don't recommend it for user uploaded images. It's going to use up a lot of memory, and potentially be an attack vector. I created this library to hande extracting the first frame from a gif: https://github.com/leafo/giflib