Page 1 of 1
Output to clipboard
Posted: 2011-06-11T15:43:38-07:00
by Elapido
Can I run identify -format to output the result to the clipboard?
Also, can I use this command to get the area in pixels of the image? I can get something like '640x480', but I'd like: 307200. Is it possible?
Re: Output to clipboard
Posted: 2011-06-11T16:26:09-07:00
by fmw42
I cannot answer the first question, but for the second you can do:
convert yourimage -ping -format "%[fx:w*h]" info:
for example using the rose: IM internal image
convert rose: -ping -format "%[fx:w*h]" info:
3220
the -ping avoids reading the full image so makes it quicker.
see
http://www.imagemagick.org/script/escape.php
http://www.imagemagick.org/Usage/transform/#fx
http://www.imagemagick.org/script/fx.php
http://www.imagemagick.org/Usage/basics/#controls
For windows users, I believe that you need %% rather than %. See
http://www.imagemagick.org/Usage/windows/
Re: Output to clipboard
Posted: 2011-06-11T18:21:11-07:00
by anthony
First part... YES
Use the special output format
clip: that is
Re: Output to clipboard
Posted: 2011-06-11T23:29:47-07:00
by Elapido
How do I get the output in decimal format? With large images I get something like: 1e+006
Thank for the replies.
Re: Output to clipboard
Posted: 2011-06-12T03:00:21-07:00
by anthony
That is a valid number format, and used for very large numbers. In that case it means 1 million. 1 with 6 digits after the first number.
Re: Output to clipboard
Posted: 2011-06-12T06:51:47-07:00
by Elapido
I understand, but autohotkey doesn't understand it when doing calculations.
Re: Output to clipboard
Posted: 2011-06-13T01:52:47-07:00
by anthony
Type increasing
-precision from 6 to 8 to include more significant digits
Code: Select all
convert null: -format '%[fx:1e+6]' info:
1e+06
convert null: -precision 8 -format '%[fx:1e+6]' info:
1000000
Re: Output to clipboard
Posted: 2015-05-26T07:19:08-07:00
by pipitas
anthony wrote:First part... YES
Use the special output format
clip: that is
Am I right in assuming that this no longer works? That the meaning of
clip: has changed since the above was written, 4 years ago?
Re: Output to clipboard
Posted: 2015-05-26T07:35:39-07:00
by dlemstra
clip: is now used to save the clip path of a file, you should use clipboard: instead.
Re: Output to clipboard
Posted: 2015-06-06T08:57:50-07:00
by pipitas
dlemstra wrote:clip: is now used to save the clip path of a file, you should use clipboard: instead.
...but
'clipboard:' works only on Windows, not on other OS platforms.
Re: Output to clipboard
Posted: 2015-06-06T18:16:23-07:00
by dlemstra
It is supported for builds that use X11, check line 234 of screenshot.c