WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Take screen shot of a specific area using script  (Read 10844 times)

Offline malikawan

  • Full Member
  • ***
  • Posts: 243
Take screen shot of a specific area using script
« on: January 06, 2014, 03:11:59 AM »
hi to all
I want to take screen shot of a specific area using script.any idea plz

Malik Awan

“ Computers are good at following instructions, but not at reading your mind. ”


Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Take screen shot of a specific area using script
« Reply #1 on: January 06, 2014, 06:38:03 AM »
Have you searched this forum?
There have been several scripts and 1-liner commands to take screenshots of single windows posted, though if you need an area regardless of windows that might be a bit more tricky.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Take screen shot of a specific area using script
« Reply #2 on: January 06, 2014, 12:39:49 PM »

Offline malikawan

  • Full Member
  • ***
  • Posts: 243
Re: Take screen shot of a specific area using script
« Reply #3 on: January 13, 2014, 12:05:06 AM »
Hi malikawan
This thread may be of use to you:
http://forum.tinycorelinux.net/index.php/topic,15086.msg86458.html#msg86458

Thanx for reply Rich but i need a specific area to capture and also i need command line because i want to use in my java application for capturing a specific area of a window when user click on specific button plz if any one help.

Malik Awan


“ Computers are good at following instructions, but not at reading your mind. ”

Offline malikawan

  • Full Member
  • ***
  • Posts: 243
Re: Take screen shot of a specific area using script
« Reply #4 on: January 17, 2014, 08:25:11 AM »
Any idea plz i need to use in my java code

Malik Awan

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Take screen shot of a specific area using script
« Reply #5 on: January 17, 2014, 02:21:14 PM »
Hi malikawan
You could look into  netpbm  or  ImageMagick.

Offline malikawan

  • Full Member
  • ***
  • Posts: 243
Re: Take screen shot of a specific area using script
« Reply #6 on: January 17, 2014, 03:34:04 PM »
Thanx rich for reply

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Take screen shot of a specific area using script
« Reply #7 on: January 17, 2014, 06:57:10 PM »
i need a specific area to capture and also i need command line because i want to use in my java application for capturing a specific area of a window when user click on specific button plz if any one help.
How are
A. command line
B. java application
C. click on specific button
related between each other?
???
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline malikawan

  • Full Member
  • ***
  • Posts: 243
Re: Take screen shot of a specific area using script
« Reply #8 on: January 18, 2014, 12:45:35 AM »
i need a specific area to capture and also i need command line because i want to use in my java application for capturing a specific area of a window when user click on specific button plz if any one help.
How are
A. command line
B. java application
C. click on specific button
related between each other?
???

tinypoodle thanx for reply i want to create a script in tiny core. Which give me the specific area screen shot then i run this script in my java program through a button when user click that button the sh script run.

Malik Awan

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Take screen shot of a specific area using script
« Reply #9 on: January 18, 2014, 03:58:34 PM »
Last on its own seems to make sense, but then I couldn't understand at all what role exactly would
Quote
and also i need command line
play with that...
???

Could you please elaborate more in detail about?
« Last Edit: January 18, 2014, 04:00:41 PM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline malikawan

  • Full Member
  • ***
  • Posts: 243
Re: Take screen shot of a specific area using script
« Reply #10 on: January 18, 2014, 04:22:41 PM »
i have a java application and in this application i use specific area snap shot which required by user that when gui open the user need some snap shot of specific area so that is why i need it

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Take screen shot of a specific area using script
« Reply #11 on: January 18, 2014, 04:36:19 PM »
Based on that I assume command line is not of any relevance then.

Do I understand right that you want an offset relative to the the screen area covered by a specified window, rather than an offset relative to screen?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline malikawan

  • Full Member
  • ***
  • Posts: 243
Re: Take screen shot of a specific area using script
« Reply #12 on: January 19, 2014, 06:31:02 AM »
Based on that I assume command line is not of any relevance then.

Do I understand right that you want an offset relative to the the screen area covered by a specified window, rather than an offset relative to screen?
tinypoodle thanx for reply yes but my java program have diveded to three window left, right and centermain and i want to capture only centremain window area.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Take screen shot of a specific area using script
« Reply #13 on: January 20, 2014, 12:54:21 AM »
http://recordmydesktop.sourceforge.net/manpage.php
is explicit and descriptive in detail about capturing relative to a specified window area.
I wouldn't know though if you could record a single frame with recordmydesktop, you'd have to research further on that.

http://ffmpeg.mplayerhq.hu/ffmpeg.html#X11-grabbing
can most likely capture a single frame, but I wouldn't know if it could capture relative to a specified window area.

Also you can look into documentation of 'import' from ImageMagick - as already hinted by Rich in Reply #5, particularly the "-window id" and the various geometry options.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Take screen shot of a specific area using script
« Reply #14 on: January 20, 2014, 02:46:22 AM »
Hi tinypoodle
Quote
particularly the "-window id" and the various geometry options.
If he has the window id he can adapt the windowshot script and avoid installing ImageMagic.