Can I take a screenshot as vector graphics or at a higher resolution than native?

33

13

I need to take some screenshots of an application window. My laptop resolution is low, and I'd like to get high quality images.

Is there a way to grab the screen as vector graphics (e.g. EPS, PDF, SVG)? Alternatively, is there a way to take a screenshot with higher resolution than the native one?

My native resolution is 1366x768, while I'd need at least a resolution of nearly 4000x3000.

Alfatau

Posted 2012-09-13T17:44:49.867

Reputation: 499

Eroen: most operating systems have vector primitives for resolution independence - OS X uses display postscript, Windows since Vista uses WPF. The question is perfectly clear to me: is it possible to capture the vector primitives? – mikemaccana – 2017-08-01T18:57:52.000

2You could try looking into UI scaling. – Daniel Beck – 2012-09-13T17:47:29.980

I assumed Windows for your question. Please [edit] and retag if that's not the case. – slhck – 2012-09-13T18:19:20.903

> You could try looking into UI scaling.   That doesn’t change the total number of pixels rendered to the screen or available for capture. – Synetech – 2012-09-13T18:29:09.703

1This seems highly confused. Let's say you had a 10k by 10k display; how exactly do you think the application window should look different? Should it contain more items, or do you want it to have more detail in the same items? Is it a native win32 application or some other toolkit like Qt, Java or even an OpenGL or DirectX window? – Eroen – 2012-09-16T17:05:47.440

2The idea was different. I know i can't create pixels that the display does not have. I was looking for a "virtual" display resolution enhancement tool, such that i can virtually set any resolution and if it is higher than the display capabilities i will have to scroll the screen viewing everytime only a subset of it, and being able to print the virtual screen to image instead of the actual virtual screen subset being viewed. – Alfatau – 2012-09-16T20:39:02.597

While I still can't really figure out what you want, I suggest you look at something like VNC, which creates a virtual desktop for use over a network connection. I can't really test and write a solution, since I don't have a windows installation handy. – Eroen – 2012-09-16T21:35:51.127

Answers

22

Of course! Yes, you can do that. You will need a UI rendering engine that has vector backend. Gtk+ 3+ has that backend. Please see this project:

But you should know the application should be able to run on Linux using Gtk+. Maybe you can create mockups either with this method, or using Microsoft Visio for having vector output.

See these samples:

If you are a Debian/Ubuntu user, for installation you can simply do

$ sudo apt-get install gtk-vector-screenshot
$ take-vector-screenshot

And then you only need to choose what application you want to take screenshot with your mouse. Curently, the application should be a Gtk+ 3 for a successful vector screenshot. The result will be a PDF file in the current working directory.

take-vector-screenshot application

PS: Good news: Firefox 42 will be using Gtk+3.

Ho1

Posted 2012-09-13T17:44:49.867

Reputation: 523

@Ho1, from an online search, it seems that OS X is able to acquire PDF screenshots: http://www.idownloadblog.com/2014/07/31/how-to-change-mac-screenshot-file-format/

– Andrea Lazzarotto – 2015-10-26T23:13:49.893

@AndreaLazzarotto Thanks. But is it vector? I couldn't find a download link. If you have Mac, could you please create a PDF screenshot yourself? We had some discussions here about vector screenshots of Mac, here: http://apple.stackexchange.com/a/144596/90089

– Ho1 – 2015-10-27T18:27:59.093

I don't own one but I got access to a OS X machine. Using the screencapture utility from the command line gives a faux PDF, it seems. – Andrea Lazzarotto – 2015-10-28T13:41:47.967

1I can make screenshots of other programs, but if I trie it with Firefox it takes the screenshot but the screenshot is completely blank. Working on Ubuntu Gnome. Taking screenshots of Midori or Chromium don't work without any error message or any window opening... – nnn – 2016-11-13T12:31:54.670

1Nice! Though the question is tagged Windows, this is still a very useful answer for future visitors who find this question. – Arjan – 2013-06-30T20:41:26.190

1Thanks, actually that tag is not from the guy who asked question. In fact, this is somehow a tricky process, but with Metro and Retina, maybe this is/will be possible on Win/Mac. It deserves a good research. – Ho1 – 2013-06-30T21:31:46.763

10

Capture as vector? No of course not. There is no way for the capture program to know anything about the geometry of the shapes on screen without having some sort of hook into the program(s) doing the drawing.

What you can do however is to capture a raster image and then convert that to vector. There are tools like Inkscape that can perform this conversion (though you will usually have to manually do some tweaking, and even then, you will rarely be able to get pixel-perfect results).

As for the resolution, when you perform a capture, it cannot capture more information than is available. You can re-size the resulting image up, and if you use a good scaling algorithm, the interpolated pixels will blend fairly well, but there is no way to invent more pixel information than is present.

Theoretically, it could be possible to implement some sort of system in which everything is rendered internally at a higher resolution and then sent it to the screen at a lesser one, but that would require special support in both the OS and the drive, and is unlikely to be implemented since it has very limited use and would only be a waste of memory in most scenarios.

You may be able to use desktop-panning to achieve a higher resolution desktop than the screen supports, but again, that requires that your drivers support it.

Synetech

Posted 2012-09-13T17:44:49.867

Reputation: 63 242

1You're wrong - most GUI elements are exceptionally vector-based, including gradients. But -- mainstream OSes and and GUI frameworks provides external listeners API for screen grabbers, and this is big problem, but no whell known capture programs support this. For example you can look on regular Windows Inspect client: it can grab all UI events, and you can make your own tool which will render this events into vector screenshot. – Dmitry Ponyatov – 2017-05-22T08:02:08.920

But for real vector capture application you must include OCR & tracing modules as fallback -- lot of programs use precomputed bitmaps, and this is another (marketing-inspired) big problem. – Dmitry Ponyatov – 2017-05-22T08:11:12.217

1

Assuming the window has a small colour palette and is fairly simple, there are https://en.wikipedia.org/wiki/Pixel_art_scaling_algorithms that might be useful.

– Eroen – 2012-09-16T17:08:39.187

@hit-and-run-down-voter, what (if anything) is your issue? Others seem to like the answer, so I can’t address any problems you may or may not have with it if you don’t bother to leave a comment. – Synetech – 2014-05-08T02:19:13.273

0

Not currently. This should be possible but it not.

Both are native vector UIs, but allow bitmaps to be used as well - this is an excellent fit for SVG. However while tools to export WPF to SVG exist, most of these are aimed at software developers. For example, you would need the XAML source of your application then export that into SVG.

mikemaccana

Posted 2012-09-13T17:44:49.867

Reputation: 392

-1

For UNIX users, you can use either KSnapShot or GIMP. More details are given in graphical screen

To install KSnapShot, you can use this link KSnapShot

GIMP is available for Windows as well.

Maulik Madhavi

Posted 2012-09-13T17:44:49.867

Reputation: 1

These seem to be just normal snapshot tools, nothing said about vector graphics or resolution higher than on screen. Am I getting somethin wrong? – T S – 2019-08-27T09:53:54.083