convert "info:" option as a way of using convert for identify?

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
lourens
Posts: 2
Joined: 2016-12-06T05:55:57-07:00
Authentication code: 1151

convert "info:" option as a way of using convert for identify?

Post by lourens »

[Background information:I was trying to help someone with setting up imagemagick on a synology machine.
I managed to get "convert" available through some package installer there.
However, no executable for "identify" was part of the installed package.
We do need "identify" though. (for mediawiki).]

I noticed (by surfing the web) that "convert" has an option "info:" which seemed to imply that it provides
a way to use "convert" to get "identify" functionality.

I did not find that in the documentation though (manpage, convert -h).

Question1: Is "convert [options] info:" (almost) equivalent to "identify [options]"?

Question2: If so, would the following script be a way of providing a missing "identify"? (This is probably outside the scope of the mailinglist)
-----------------------------------------
#/bin/bash
PARAMS=""
for PARAM in "$@"
do
PARAMS="${PARAMS} \"${PARAM}\""
done
bash -c "convert ${PARAMS} info:"
---------------------------------------------

Thanks!
Lourens
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert "info:" option as a way of using convert for identify?

Post by snibgo »

Why haven't you told us the version number of IM that was installed? What is the platform? Unix or something?

If "convert" was installed but "identify" wasn't, perhaps you are using v7. If so, then you can use "magick identify" instead of "identify".
Question1: Is "convert [options] info:" (almost) equivalent to "identify [options]"?
Yes.
snibgo's IM pages: im.snibgo.com
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert "info:" option as a way of using convert for identify?

Post by anthony »

See IM Examples... Identify Output Alternatives
http://www.imagemagick.org/Usage/basics/#identify_alt

Added in IM v6.2.4

That is you can use a number of options
info: (as final image)
-write info:
-identify
-print
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
lourens
Posts: 2
Joined: 2016-12-06T05:55:57-07:00
Authentication code: 1151

Re: convert "info:" option as a way of using convert for identify?

Post by lourens »

Thanks for the useful answers. Sorry for the incomplete information. This is a synology NAS of a friend to who's machine I have limited access to with an
Linux operating system dialect I am not familiar with. It is "DSM 6.0". I did not really find out in what way imagemagick got installed on the machine.
(The version is 6.9.5-0 Q8). Thanks again for the "info:" explanation.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert "info:" option as a way of using convert for identify?

Post by anthony »

In a NAS.. interesting.. I have a ReadyNAS myself as my first NAS.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply