ImageMagick:为什么调整后的 GIF 图像似乎有一些颜色被白色代替了?
ImageMagick: why resized GIF image seems to have some colors replaced by white?
想知道是否有人知道是什么原因造成的。
原图:
缩略图代码(使用http://aheckmann.github.io/gm/):
const generateThumb = () => gm(this.getReadStream())
.in('-thumbnail', '400x400^')
.in('-gravity', 'center')
.in('-extent', '400x400')
.in('+profile', '*')
.autoOrient()
.stream()
结果图像:
添加 -background transparent
解决了问题。
想知道是否有人知道是什么原因造成的。
原图:
缩略图代码(使用http://aheckmann.github.io/gm/):
const generateThumb = () => gm(this.getReadStream())
.in('-thumbnail', '400x400^')
.in('-gravity', 'center')
.in('-extent', '400x400')
.in('+profile', '*')
.autoOrient()
.stream()
结果图像:
添加 -background transparent
解决了问题。