mermaid.cli icon indicating copy to clipboard operation
mermaid.cli copied to clipboard

Allow changing DPI of generated image

Open Fenntasy opened this issue 5 years ago • 7 comments

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

Fenntasy avatar May 13 '19 14:05 Fenntasy

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.

agusmba avatar May 14 '19 07:05 agusmba

You're right, I made the change :)

Fenntasy avatar May 14 '19 08:05 Fenntasy

Any news about this?

bennyhuo avatar Feb 05 '20 08:02 bennyhuo

Hoping this could be merged already. Tried and applied the fix on my local copy and works as intended.

LouisMaycol avatar Mar 10 '20 03:03 LouisMaycol

👍 This would be really useful when creating Mermaid files locally on my Mac. /cc @tylerlong

zachwill avatar Apr 10 '20 20:04 zachwill

Any progress on this? I'm adding mermaid-js support to lookatme. I'm willing to help resolve any blockers to get this in.

d0c-s4vage avatar Oct 10 '20 20:10 d0c-s4vage

+FYI: https://github.com/mermaidjs/mermaid.cli/issues/3

This functionality is present and can be used.

IAXES avatar Dec 17 '20 15:12 IAXES

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.

aloisklink avatar Jul 21 '23 23:07 aloisklink