יואב שלו
יואב שלו

Reputation: 19

Take a screen shot of a specif area and save as variable

I want to make a program taking a cropped screenshot (like Windows+Shift+s) and save it as variable, not as a file.

  1. How do I Programmatically open this win+shift+s window?

  2. How to directly get the output without saving this as a picture?

I'm using python

Upvotes: 0

Views: 402

Answers (1)

LTBS46
LTBS46

Reputation: 225

you will need to:

  1. trigger the Print screen key (any keyboard library should allow it)
  2. retrieve the data from the clipboard (you will maybe forced to save it as a temporary file and then read from it)
  3. then parse the data it will be it will png format.

Upvotes: 1

Related Questions