Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNG Output Seriously Degraded and Unusable after Version 9.1.6 #4420

Closed
p2gdeveloper opened this issue May 22, 2023 · 1 comment
Closed

PNG Output Seriously Degraded and Unusable after Version 9.1.6 #4420

p2gdeveloper opened this issue May 22, 2023 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@p2gdeveloper
Copy link

p2gdeveloper commented May 22, 2023

Description

I have written some farily standard code to download my Mermaid drawings as PNG images but there is a huge drop in quality when I do this in version 9.1.7+ versus 9.1.6. The images in versions 9.1.7 and up are so blurry that they are unusable. I have done some troubleshooting and digging and found that:

  1. If I set useMaxWidth to false, this resolves the issue for Sequence diagrams but sadly not for ER, Class and State diagrams etc. I think it is therefore linked to the discussion here: SVG height attribute absent with 9.1.7 #3659 between @knsv and the OP.
  2. The issue does not seem to affect User Journey diagrams.
  3. I can only sort of reproduce the issue in the live editor if I set the width to somehing like 400px or lower. This is not the case in my app however - it doesn't matter what the width is and as I say, it works fine in v9.1.6.

I have spent weeks trying to find a workaround to this as I really need some of the functionality in later versions than v9.1.6 so someone please help.

Steps to reproduce

  1. Go to https://ajmn2.bubbleapps.io/version-test/mermaid_v916 to see an acceptable image from v9.1.6.
  2. Go to https://ajmn2.bubbleapps.io/version-test/mermaid_v943 to see the same image from v9.4.3.
  3. Compare the two - or just look at the two screenshots I have linked to below.

Screenshots

Screenshots: https://imgur.com/a/nx2LfFK

Code Sample

No response

Setup

  • Mermaid version: 9.1.7 and above.
  • Browser and Version: Chrome

Additional Context

No response

@p2gdeveloper p2gdeveloper added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels May 22, 2023
@p2gdeveloper p2gdeveloper changed the title Post v9.1.6 Exporting a HTML Canvas with a Mermaid Drawing as an Image Results in a Blown Out Image Post v9.1.6, exporting a HTML Canvas with a Mermaid drawing as an image, results in a blown-out image May 22, 2023
@p2gdeveloper p2gdeveloper changed the title Post v9.1.6, exporting a HTML Canvas with a Mermaid drawing as an image, results in a blown-out image PNG Output Seriously Degraded and Unusable after Version 9.1.6 Jul 18, 2023
@p2gdeveloper
Copy link
Author

p2gdeveloper commented Jul 18, 2023

I'm still testing but using the viewBox height for the png image seems to be a workaround for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant