outputting captured screenshot to svg format?

347 views
Skip to first unread message

headless-man

unread,
Jul 4, 2017, 3:34:58 AM7/4/17
to headless-dev
now currently chrome supports output screenshot to png, jpg & pdf, are there any ways to output to svg format or any plans to add the feature?

Eric Seckler

unread,
Jul 4, 2017, 4:04:35 AM7/4/17
to headless-man, headless-dev
I don't think there are any plans at the moment. Chromium's compositing pipeline rasters down to pixels, so creating a vector graphic instead is difficult to realize. PDFs are a different thing altogether, because that uses the printing functionality, not screenshotting from the compositor.

On Tue, Jul 4, 2017 at 8:34 AM headless-man <bakht...@gmail.com> wrote:
now currently chrome supports output screenshot to png, jpg & pdf, are there any ways to output to svg format or any plans to add the feature?

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/dd8a18ef-164d-48a0-b165-405fe5c3f9a4%40chromium.org.

headless-man

unread,
Jul 4, 2017, 4:22:47 AM7/4/17
to headless-dev, bakht...@gmail.com
thanks, and so don't have any tricks (maybe third-party libs, evaluating js codes, ...)?

Eric Seckler

unread,
Jul 4, 2017, 4:28:29 AM7/4/17
to headless-man, headless-dev
I'm afraid not. Final rendering and screenshotting happens in the browser, because rendering inputs from different processes have to be combined to form the resulting image. There's not much you can do from JS. You can of course grab a PNG screenshot and transform that into an SVG in your client, but you're unlikely to get a quality vector graphic from that. Printing to PDF and transforming that into an SVG in your client may be an option, but the output would be a printed page (print-mode, paginated rendering), not a screenshot.

Reply all
Reply to author
Forward
0 new messages