mermaid.cli
mermaid.cli copied to clipboard
Allow changing DPI of generated image
This PR would allow setting the DPI of a screenshot to have a better quality image in the end.
A DPI of 2 is equivalent to 4 times the size of the image and is roughly what happens in a retina screen.
This would also fix #51
My 2c, personally I wouldn't use the new option name "dpi" since it has a different meaning from what you're using it for. Maybe "scale" as an alternative name? @tylerlong can probably suggest a better one.
You're right, I made the change :)
Any news about this?
Hoping this could be merged already. Tried and applied the fix on my local copy and works as intended.
👍 This would be really useful when creating Mermaid files locally on my Mac. /cc @tylerlong
Any progress on this? I'm adding mermaid-js support to lookatme. I'm willing to help resolve any blockers to get this in.
+FYI: https://github.com/mermaidjs/mermaid.cli/issues/3
This functionality is present and can be used.
Development has moved to the https://github.com/mermaid-js/mermaid-cli repo.
It looks like somebody has already made quite a similar contribution a few years ago too:
https://github.com/mermaid-js/mermaid-cli/commit/6d7cbcb56b501e9c0a84616a33b2ffc21db25361, so this feature already exists in the @mermaid-js/mermaid-cli
package.
The package has also been renamed on NPM to @mermaid-js/mermaid-cli
, so you may need to run npm uninstall mermaid.cli && npm install @mermaid-js/mermaid-cli
to get the latest version of this package.