convert -identify without copying image?

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
capncrunch9834
Posts: 13
Joined: 2012-06-11T07:39:40-07:00
Authentication code: 13

convert -identify without copying image?

Post by capncrunch9834 »

Is there a way to use convert -identify without copying the image to another file? It seems like I saw a post that discussed this but I can't find it anywhere.

On the windows cmd line I have something like this...

convert "imageIN.jpg" -verbose -identify "imageOUT.jpg" > info.txt

but what I am shooting for is something like...

convert "imageIN.jpg" -verbose -identify nul > info.txt
(or some equivalent)

All I want is the image info piped out to text without converting or copying the input image -- but to do so using convert only.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: convert -identify without copying image?

Post by Bonzo »

Try using -ping

Untested

Code: Select all

identify -ping imageIN.jpg > info.txt
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: convert -identify without copying image?

Post by pipitas »

capncrunch9834 wrote:Is there a way to use convert -identify without copying the image to another file? It seems like I saw a post that discussed this but I can't find it anywhere.

On the windows cmd line I have something like this...

convert "imageIN.jpg" -verbose -identify "imageOUT.jpg" > info.txt

but what I am shooting for is something like...

convert "imageIN.jpg" -verbose -identify nul > info.txt
(or some equivalent)

All I want is the image info piped out to text without converting or copying the input image -- but to do so using convert only.
Why can't you simply use

Code: Select all

identify -verbose imageN.jpg > info.txt
?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert -identify without copying image?

Post by fmw42 »

I believe this is really what you want:


convert yourimage -verbose info: > yourimage_info.txt

see
http://www.imagemagick.org/Usage/files/#info
capncrunch9834
Posts: 13
Joined: 2012-06-11T07:39:40-07:00
Authentication code: 13

Re: convert -identify without copying image?

Post by capncrunch9834 »

That's the ticket! Thank you fmw42. As usual, you got it right.

Thanks!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert -identify without copying image?

Post by anthony »

But this also works...

Code: Select all

 convert image.png -identify null:
See Identify and its Alternatives in IM Examples, basics
http://www.imagemagick.org/Usage/basics/#identify
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply