【发布时间】:2017-02-13 22:22:33
【问题描述】:
【问题讨论】:
-
如果红色层是透明的,你就看不到了!您的示例中的白色措辞来自哪里 - 为什么没有变红?
-
在 imagemagick 中,我会使用 -blend 或 -colorize 但我不知道 gm 中会是什么;但它应该会给你一些搜索的东西。
标签: node.js imagemagick gm
【问题讨论】:
标签: node.js imagemagick gm
我接受了@Bonzo 的建议并使用了 blend。使用 Node gm,您可以直接调用 ImageMagick 方法。
const gm = require('gm');
const im = gm.subClass({ imageMagick: true });
im()
.command('composite')
.in('-blend', '100x100')
.in('-gravity', 'center')
.in('/tmp/top.png')
.in('/tmp/bottom.png').toBuffer('PNG',function (err, buffer) { }
【讨论】: