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

Wrong image exporting #99

Open
mattsrinc opened this issue Apr 13, 2021 · 2 comments
Open

Wrong image exporting #99

mattsrinc opened this issue Apr 13, 2021 · 2 comments

Comments

@mattsrinc
Copy link

mattsrinc commented Apr 13, 2021

I'm submitting an official bug after days of struggling (believing it was a Leaflet and/or one of caching plugins for it).

Here's the comparison of svgexport output for one part of the larger image:

svgexport-bug-png-generation

You can see the proper output with svgexport 0.3.2 (no Puppeteer library) and missing part with svgexport 0.4 (.0 and .1, with Puppeteer). I'm certain that going Puppeteer is the right way and suspect the bug might be in the resize.js.

The svgexport command to reproduce the above was equivalent to this

svgexport test.svg test.png 1591:2214:1107:1107 256:256 'svg{background:none}'

and actually all exported parts of the image when top position specified in viewBox was higher (number) than above are completely blank with svgexport 0.4.1.

So the issue is related to #98 regarding missing parts of an exported image.

I cannot upload the image for above (client copyright) yet am attaching a sample image with same viewBox to test. You can uncomment javascript part in the file to generate other patterns (but do have fixed image to test :-) ).
checkboard-fixed.svg.zip

@mattsrinc
Copy link
Author

Here's one bigger map, tiles exported with svgexport 0.4.1 (version 0.3.2 just freezes on the first image, SVG viewbox is "0 0 4688 7015".

Screenshot_2021-04-15 Leaflet properties map

So image tiles are just not generated with svgexport, and command line is the same with proper parameter

SVGEXPORT_TIMEOUT=90

(at this SVG resolution on older MacBook Pro each image export takes max. 75 s).

Would really like to get any help on this one.

@kryztoval
Copy link

I don't know if this is related, but I was trying to export the Ghostscript_Tiger.svg in high resolution (anything above 11x) and the image gets cut off. If I go 20x it would say "Error: Protocol error (Page.captureScreenshot): Unable to capture screenshot"

My computer has 51GB of free ram, running svgexport as admin or user changed nothing.

As this user suggested, using version 0.3.2 works flawlessly exporting the Ghostscript_Tiver.svg at 20x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants