I'm Building Taskito
I'm Building Taskito
Get it on Google Play Download on the App Store

Capture any visible window and save it as an image in Linux


Out of nowhere, I found this out. I thought I was in IPython shell and I did import cv2. A crossbar showed up. So, I moved it around for a while and then clicked. Nothing happened. I did import mftracker. Again a crossbar showed up. When I clicked, nothing happened. After few moments, I realized I was in Terminal and not in IPython shell.

After few hours, I opened my home directory and found out that there were two images named cv2 and mftracker. It just struck me. I opened the terminal and once again

$ import cv2.

A crossbar showed up. I clicked on some other window, and that window got saved as an image.

$ man import

   import  -  saves any visible window on an X server and outputs it as an
   image file. You can capture a single window, the entire screen, or  any
   rectangular portion of the screen.

So, to save any visible window as an image

$ import foo.jpg

P.S. **pyOpenTLD - Python port of OpenTLD. 60% complete.

Playing around with Android UI

Articles focusing on Android UI - playing around with ViewPagers, CoordinatorLayout, meaningful motions and animations, implementing difficult customized views, etc.

Read next