Search code examples
imagemagick-convertgraphicsmagickgm

ImageMagick: why resized GIF image seems to have some colors replaced by white?


Was wondering if anyone knows what might be causing this.

Original image:

img_20160206

Thumbnail code (using http://aheckmann.github.io/gm/):

  const generateThumb = () => gm(this.getReadStream())
    .in('-thumbnail', '400x400^')
    .in('-gravity', 'center')
    .in('-extent', '400x400')
    .in('+profile', '*')
    .autoOrient()
    .stream()

Resulting image:

waves-thumb


Solution

  • Adding -background transparent fixed the problem.

    enter image description here