Page MenuHomePhabricator

Transparent meme animated gifs show up with a black background
Closed, ResolvedPublic

Assigned To
None
Authored By
cburroughs
Jul 29 2014, 8:11 PM
Referenced Files
F5470969: frame-pileup.gif
Mar 13 2018, 4:27 PM
F5470967: frame-original.gif
Mar 13 2018, 4:27 PM
F5470971: frame-nopileup.gif
Mar 13 2018, 4:27 PM

Description

  • Install a gif like http://streetfighter.wikia.com/wiki/File:Ken-hurricane-ts.gif Be sure to give it a cool name like tatsumakisenpukyaku
  • Reference in a comment using {meme, src=} syntax
  • In the maco details page it will look 'normal' (with the "I am transparent!" checkered background), in /macro it will look sort of blurry with a white background, but in the comment it will have a black background.

(I have imagemagick installed per T4096)

Event Timeline

cburroughs raised the priority of this task from to Needs Triage.
cburroughs updated the task description. (Show Details)
cburroughs added a subscriber: cburroughs.

Am I doing it right/wrong? Sounds like an imagemagick issue, not something with Phabricator.

Macro sfken:

sfken

It looks like something to do with {meme, src=foo} vs just foo

Ah, I didn't realize people were using the {meme}Remarkup without text. I don't know if transparency is supported with that, we'll have to investigate.

Macro sfken: text goes above below

chad renamed this task from macros from animated gifs show up with a black background when used in comments to Transparent meme animated gifs show up with a black background.Jul 30 2014, 2:48 PM
chad triaged this task as Low priority.
chad updated the task description. (Show Details)
chad added a project: Macros.

I wasn't able to reproduce the black background issue, exactly, but here's what I changed:

For comparison, here's the original GIF:

frame-original.gif (138×160 px, 61 KB)

Prior to D19214, this appeared to turn into this GIF when mangled through the meme pipeline. There's no black background, but the frames are piling up on top of one another:

frame-pileup.gif (138×160 px, 59 KB)

After D19214, we use -dispose background to wipe frames before repainting them, which produces this GIF:

frame-nopileup.gif (138×160 px, 60 KB)

Because we split the frames out with -coalesce, which should fully rasterize each frame, this change should be safe even for GIFs which rely on -dispose none.

Note that although the pixels are correct for each frame now, the mangled GIF isn't perfect: the frame rate has changed since we've lost the delay metadata. I think this is hard to fix, so I don't currently plan to fix this.

This should also work with overlay text:

{meme, src= tatsumakisenpukyaku, below=hundred hand slap}

Macro tatsumakisenpukyaku:  hundred hand slap