# Emojis from animated gif are shown uglily

**URL:** <https://meta.discourse.org/t/emojis-from-animated-gif-are-shown-uglily/25562>\
**Category:** Bug\
**Tags:** emoji\
**Created:** [2015年二月23日 10:08 UTC](https://meta.discourse.org/t/emojis-from-animated-gif-are-shown-uglily/25562 "2015-02-23T10:08:09Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![sigurdur](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sigurdur/32/122516_2.png) [@sigurdur](https://meta.discourse.org/u/sigurdur)\
**Post date:** [2015年二月24日 17:25 UTC](https://meta.discourse.org/t/emojis-from-animated-gif-are-shown-uglily/25562/9 "2015-02-24T17:25:44Z")

</div>

> [@zogstrip](#):
>
> So, having -layers optimize at the end does the optimization without butchering the GIF?

## ORIGINAL

Hmm .. I did a couple of more tests, using this image as a base ..  
 ![](https://global.discourse-cdn.com/meta/original/3X/6/5/65137061474887dfa0f183f2bc118a3e52fc353e.gif)

## Resized and optimized

When I resize it down to 60x60, it looks like frame 0 has been butchered a bit..  
 ![](https://global.discourse-cdn.com/meta/original/3X/d/c/dc9253acde17bd9f7e7f0f430f062ce734a97656.gif)  
Here’s frame 0  
 ![](https://global.discourse-cdn.com/meta/original/3X/5/f/5f920abd706ded04ec079908731bb1008ce94b2d.gif)

## Resized, not optimized

If I resize it to 60 without optimization then frame 0 isn’t butchered..  
 ![](https://global.discourse-cdn.com/meta/original/3X/9/9/99b399ad6fe7cea395efcba82957f675f39424f5.gif)  
 ![](https://global.discourse-cdn.com/meta/original/3X/2/c/2cc167e237ddaec116f9b48fff20cbfc28d50e4b.gif)

## Resized, optimized using gifsicle

I figured that there must be a way to have your banana and eat it too .. so how about not using imagemagick for optimization, but [gifsicle](http://www.lcdf.org/gifsicle/) for optimization..  
 ![](https://global.discourse-cdn.com/meta/original/3X/b/c/bca2145f252421c6641a3d17ee9079bb61ef669e.gif)  
 ![](https://global.discourse-cdn.com/meta/original/3X/3/7/37c4d4cafcf8dca1ba835a96f7b7684dc38d9d73.gif)

FYI, the command used to optimize using gifsicle

```
$ gifsicle -O2 banananoopt.gif -o bananagifsicleO2.gif

```

**Please note** that you can resize using gifsicle, but gifsicle doesn’t worry about quality as much as imagemagick.

## What about the optimization sizes?

Let’s take a look:

```
$ ll banana*
-rw-r--r-- 1 sigurdur sigurdur 73623 maí 9 2012 banana.gif
-rw-r--r-- 1 sigurdur sigurdur 13911 feb 24 17:02 bananagifsicleO2.gif
-rw-r--r-- 1 sigurdur sigurdur 14093 feb 24 16:53 banananoopt.gif
-rw-r--r-- 1 sigurdur sigurdur 8832 feb 24 16:43 bananaopt.gif

```

So, it looks like imagemagick is able to compress the most, but butchers the images.

If we resize with imagemagick and optimize with gifsicle then we get an image that looks right and is optimized for size .. 36% bigger than the butchered image in this case though ..

If we resize with imagemagick and skip the optimization then we get an image that is 37% bigger than the optimized image, but we save some cpu cycles.

## Conclusion

I say we should remove the optimization flag from the convert command.  
Adding gifsicle will require a modification to the docker and added cpu cycles when a user uploads an image, only for saving 182 Bytes .. not worth it IMHO at this moment.

What do you say @zogstrip?

---

_[View the full topic](https://meta.discourse.org/t/emojis-from-animated-gif-are-shown-uglily/25562)._
