Skip to content
Discussion options

You must be logged in to vote

Hi Orangewithsugar,

The quality parameter only affects the quality when the image is generated with toJPEG(), i.e. it has no effect for toPNG().

The parameter you are looking for is size (https://docs.jointjs.com/api/format/Raster/#size). By default ('1x'), the size of the generated PNG matches the size of the SVG at the time of export. Increasing the value here will make the PNG that much larger (= have that much more detail at zoom). For example, passing in '2x' here will make the PNG twice as large in each direction than the origin SVG.

Best regards,
Zbynek Stara

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Orangewithsugar
Comment options

Answer selected by Orangewithsugar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants