Javascript Auto Download Screenshot as Image From Clipboard

January 23rd, 2020





The utility in action.

Take a screenshot with PrintScreen and paste it hear to get a png file returned.

Ever wanted to save a screenshot on windows but don’t want to have to install utilities or deal with MS Paint?

Have I the utility for you. Made fresh using a few lines of javascript, all you have to do is press “Alt+Prt Sc” or whatever your print screen key is to take a screenshot, then “Ctrl+V” on this utility and it will automatically download. This utility saves the files as png images, with the format “Screenshot-y-m-d-h-m-s.png” where ymdhms are parts of the date.

This is done using javascript to read data from the clipboard. The data is pasted into a canvas, then converted to a base64 string.

A library called download.js then takes that Base64 string and initiates a file download using it.

Here is the utility


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *