furagu / easy-gd

A simplified Node.js wrapper around GD image manipulation library with extra features making your life easier.
MIT License
25 stars 14 forks source link

Animated GIFs #7

Open jacobtomlinson opened 9 years ago

jacobtomlinson commented 9 years ago

Quick question. Can your library handle animated GIFs?

A quick test shows that watermarking an animated GIF results in a static GIF containing the first frame with the watermark successfully applied. Is this expected behaviour?

I imagine that in order to watermark an animated GIF that I would need to detect that it is animated, break the animation up into separate images, watermark each one and then reassemble them. Can I do that with easy-gd or do I need to find another library to do the detection, separation and assembling?

furagu commented 9 years ago

Hey Jacob, sorry I didn't answer the question, was away for quite a while.

Basically it boils down to the fact that easy-gd does not take care of animated gifs at all at the moment.

Probably it would be nice to have them being properly resized and watermarked. I'm not really aware if it is possible with GD but it is worthy to at least consider this issue, so thanks for bringing it up :)

Did you find any good solution btw?

jacobtomlinson commented 9 years ago

I haven't managed to find a solution to this, so I'm just detecting if they are animated gifs and not processing them if they are Would be great to find a proper solution to this.