Output to clipboard
Output to clipboard
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?
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?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Output to clipboard
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/
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/
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Output to clipboard
First part... YES
Use the special output format clip: that is
Use the special output format clip: that is
Code: Select all
convert ........... clip:
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Output to clipboard
How do I get the output in decimal format? With large images I get something like: 1e+006
Thank for the replies.
Thank for the replies.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Output to clipboard
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Output to clipboard
I understand, but autohotkey doesn't understand it when doing calculations.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Output to clipboard
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Output to clipboard
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?anthony wrote:First part... YES
Use the special output format clip: that isCode: Select all
convert ........... clip:
Re: Output to clipboard
clip: is now used to save the clip path of a file, you should use clipboard: instead.
Re: Output to clipboard
...but 'clipboard:' works only on Windows, not on other OS platforms.dlemstra wrote:clip: is now used to save the clip path of a file, you should use clipboard: instead.
Re: Output to clipboard
It is supported for builds that use X11, check line 234 of screenshot.c