Smoke-free classic duck

- 9 mins

The premise

Using emojis is part of my style of messaging during the workday. They’re quite a nice way to express yourself a little bit more than just typing words. Of course, there is time and place when one shouldn’t use them, but for e.g. in-team discussions, I’ve found them quite neat.

The “Haha, classic” duck emoji is one of the custom emojis that gets used by me and other coworkers every now and then:

The original "Haha, classic" duck

It was created by Egor Zhgun in 2019 as a sticker pack for Telegram called “Utya Duck Telegram Stickers”.

The mouth movement, shaking of the head, and the expression on the duck’s face are just *chef kiss*. But it has one problem that has irritated me for a while now.

The problem

The duck has a smoking cigarette in its hand.

I don’t smoke and I don’t advocate smoking, because it is bad for your health and for people around you.

For what’s it worth, I feel like we should stop giving space and screen time for things that are hurting us deliberately. But as humans are humans, these things still exist because of reasons unbeknownst to me.

I tried searching for alternative versions, but I couldn’t find anything that would please me.

Tenor had quite the selection, but nothing caught my eye as “the solution”. There was always something wrong with the animation e.g. unnecessary added clothing, accessories, or the gif just wasn’t suitable for actual emoji usage: file size too big, too many frames, missing transparency, bad aspect ratio… you name it.

Unnecessary accessories

The solution

With an idea in my head, some tools and too much time on my hands one late evening, I decided to create something that would tick all the boxes:

Tools used

The progress

The whole project took me around 4 hours to finish (the time to write this post is not included).

The most time-consuming step was bringing the duck’s hand in front of the coffee cup. Editing each frame of the 50 was a bit cumbersome, but doable.

Before I could work with the hand part, I had to cut the cigarette and the smoke to their own layer to make things easier. It went smoothly by using the Magic Wand tool with quite specific Tolerance setting as it had different colors than the duck. For some other gif this could be a whole different story.

For each frame I selected the part of the hand that was going to overlap the cup, copied it to a new layer and saved the image as .pdn (Paint.Net format) to preserve the layers. Sometimes the selection I did took too much of the area outside the hand’s border line, but it was easily fixed.

Bringing the hand in front of the cup

I didn’t want the warm steam rising from the coffee remind too much of the smoke. First I recolored the gray smoke to something a bit warmer. Since coffee is brown, of course the animated steam should also be brown (if you squint your eyes a little bit).

Recoloring the smoke

There was a bit of uncertainty about whether I’d like to keep the original smoke-like shape of the steam, but in the end, I decided to keep it so I wouldn’t deviate too much from the original work. In the process, I found out the Distort -> Dents effect tool could have made quite a nice steam-looking effect:

Denting the steam

What-it-could-have-been

I had to make some minor corrections to the frames here and there. The original animation had a black solid background that had to be converted into transparent. This caused the eyes to disappear. Some pixels were missing, so I had to go and add those in before using the fill tool for the eyes. Now that I think of it, I might have taken the wrong source file. Transparency was easy to do with Ezgif.

Some small touch-ups had to be done in frames 46 and 47 because the “haha, classic” text had its letters move vertically in sync with the mouth, partly covering the smoke.

I also had to take out one “head bobbing” cycle to fit the animation into 50 frames. There were a total of 55 frames, so 5 had to go. Losing one cycle was a small sacrifice I was willing to take without losing too much of the charm of the original animation.

Touch-ups

Emojis are quite small. Even smaller, if you don’t crop the canvas correctly and leave too much white space around the thing we’re interested in.

I used ImageMagick to do a batch crop job to make sure to only fit in the animation frames what we’re really interested in: a duck who babbles about a classic thing.

This is the script I ended up using.

magick.exe mogrify -path ./cropped -crop 472x472+7+40 ./source/*.png

I had to add an empty cropped folder and put all the .png source frames into source folder for this to work.

Image and file size

Animated gifs used as emojis should be small in file size and mostly they are viewed in very small sizes on-screen. For example Slack has 128 KB strict file size limit and emojis are displayed at around ~22-32px.

After cropping was done I used Ezgif to resize the gif to 128x128 and then fiddled with the optimization setting until I got the file size the desired size limit.

The final result

"Haha, classic" duck emoji, cigarette replaced with a coffee cup, 128x128

Lessons learned

Afterthoughts

Was this, in any way, a sensible project to take on? Not at all.

Who would benefit reading this? I have no slightest idea.

Was it still worth it? Absolutely.

Now go, and add the emoji to your workplace’s ever-growing emoji collection, and enjoy the “haha, classic” moments in your life without having to think about cigarettes, smoking and their negative impact on life every time something classic happens!

I just might have done that.

Anssi Kettunen

Anssi Kettunen

Ohjelmistokehittäjä suorittamassa tehtävää 🦊

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora