Capture selected area

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
c7aesa7r
Posts: 5
Joined: 2018-02-03T08:14:16-07:00
Authentication code: 1152

Capture selected area

Post by c7aesa7r »

Its possible capture a selected area using imagemagick through command line?

For example capture=30,30,1,1
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Capture selected area

Post by snibgo »

Yes. For example, on Windows:

Code: Select all

convert screenshot:[30x30+1+1] x.png
snibgo's IM pages: im.snibgo.com
c7aesa7r
Posts: 5
Joined: 2018-02-03T08:14:16-07:00
Authentication code: 1152

Re: Capture selected area

Post by c7aesa7r »

Run>C:\Program Files\ImageMagick-7.0.7-Q16\convert.exe screenshot:[30x30+1+1] C:\Users\CAIO\Downloads\Nova pasta\x.png

Im running imagemagick through a macro app, how do i edit the command line?


Image
Last edited by c7aesa7r on 2018-02-03T09:42:05-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Capture selected area

Post by snibgo »

I don't know what a "macro app" is.
snibgo's IM pages: im.snibgo.com
c7aesa7r
Posts: 5
Joined: 2018-02-03T08:14:16-07:00
Authentication code: 1152

Re: Capture selected area

Post by c7aesa7r »

EDIT2: I got it working now

Code: Select all

Run>C:\Program Files\ImageMagick-7.0.7-Q16\convert.exe convert screenshot:[30x30+1+1] "C:\Users\CAIO\Downloads\Nova pasta\x.png"
One doubt its possible make it faster? Theres a delay while capturing it, i mean it opens the cmd windows, . . . . close, etc
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Capture selected area

Post by snibgo »

I normally run commands from a command window, so there is no overhead in opening or closing a window.

If you run commands by some other mechanism, perhaps it has a facility to bypass a command window. You should consult its documentation.
snibgo's IM pages: im.snibgo.com
c7aesa7r
Posts: 5
Joined: 2018-02-03T08:14:16-07:00
Authentication code: 1152

Re: Capture selected area

Post by c7aesa7r »

Im running imagemagick through a macro, name is macro scheduller, i did a post there:
https://www.mjtnet.com/forum/viewtopic. ... 685#p42685

I was using irfanview before imagemagick, but irfan dont have a option to capture just a selected area i was capturing whole screen and cropping the area i need.

But even with imagemagick i have a delay like 1 sec :(
I need any solution faster, if you know any other program that can do that.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Capture selected area

Post by snibgo »

c7aesa7r wrote:but irfan dont have a option to capture just a selected area
Yes it does, eg:

Code: Select all

%IRFANVIEW% /capture=7=(10,10,100,100) /convert=x.png
snibgo's IM pages: im.snibgo.com
c7aesa7r
Posts: 5
Joined: 2018-02-03T08:14:16-07:00
Authentication code: 1152

Re: Capture selected area

Post by c7aesa7r »

Thank you man, didn't know that!!
I think ill wont find anything faster than that.
Post Reply