S
S
Stanislav2015-02-19 18:43:57
Node.js
Stanislav, 2015-02-19 18:43:57

How to set text transparency (GraphicsMagick)?

Tell me how to set the transparency of text when overlaying it on an image using GraphicsMagick in Node.js

gm(path)
  .resize(width, height, '^')
  .gravity('Center')
  .crop(width, height)
  .noProfile()
  .font('ubuntu.ttf', 140)
  .fill('white')
  .drawText(0, 0, 'Text text', 'Center')
  .write(setPath),
function(err) {});

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav, 2015-02-20
@ms-dred

Understood
But only works when imagemagick is enabled

.options({"imageMagick": true})
.fill("rgba(255,255,255,0.075)")

D
Dimonchik, 2017-10-30
@dimonchik2013

freelansim.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question