mdimg icon indicating copy to clipboard operation
mdimg copied to clipboard

[Feature Request] Export binary Buffer without generating a new file

Open LolipopJ opened this issue 3 years ago • 1 comments

LolipopJ avatar Feb 21 '22 14:02 LolipopJ

This would be a great feature and convenient for production usage!

huan avatar Dec 06 '22 15:12 huan

Closed as v1.3.0 implements the feature.


In Node.js:

const convertRes = await mdimg({
  inputFilename: "path/to/input.md",
  encoding: "blob",
});

writeFileSync("path/to/output.png", convertRes.data);

With CLI:

mdimg -i path/to/input.md -e blob

LolipopJ avatar Aug 09 '24 09:08 LolipopJ