From manual it looks like identify should be a valid option for every ImageMagick program. For example convert.
convert -identify layout.jpg
convert: missing an image filename `layout.jpg' @ convert.c/ConvertImageCommand/2776.
identify as standalone program works.
IM 6.5.2-7
identify does not work as option for convert
Re: identify does not work as option for convert
Try
- convert logo: -verbose -identify null:
Re: identify does not work as option for convert
Ok, this one works and now I see that convert requires for identify that the filename will go first.
convert layout.jpg -identify
not
convert -identify layout.jpg
A bit odd though, I don't know if it is intended. At least error message should be more informative (imho).
convert layout.jpg -identify
not
convert -identify layout.jpg
A bit odd though, I don't know if it is intended. At least error message should be more informative (imho).
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: identify does not work as option for convert
Perhaps I misunderstand what you are trying to do. But I always just use either:
identify image
e.g.
identify rose:
rose:=>ROSE ROSE 70x46 70x46+0+0 8-bit DirectClass 9.45kb
or
convert image info:
e.g.
convert rose: info:
rose: ROSE 70x46 70x46+0+0 8-bit DirectClass 9.45kb
So, no need to add -identify to convert.
If one wants verbose information, then use either
identify -verbose image
or
convert image -verbose info:
identify image
e.g.
identify rose:
rose:=>ROSE ROSE 70x46 70x46+0+0 8-bit DirectClass 9.45kb
or
convert image info:
e.g.
convert rose: info:
rose: ROSE 70x46 70x46+0+0 8-bit DirectClass 9.45kb
So, no need to add -identify to convert.
If one wants verbose information, then use either
identify -verbose image
or
convert image -verbose info:
Re: identify does not work as option for convert
> Perhaps I misunderstand what you are trying to do. But I always just use either:
Ok, now I know identify is a program on its own. But manual says it is an option and can be used in any program from IM set. After all, users do read manuals
And the error message is misleading (I would rather say, convert in such case should handle both orders of arguments, but... I won't insist).
So the real bug is error message, and the wish would be rather handling random order.
Ok, now I know identify is a program on its own. But manual says it is an option and can be used in any program from IM set. After all, users do read manuals
And the error message is misleading (I would rather say, convert in such case should handle both orders of arguments, but... I won't insist).
So the real bug is error message, and the wish would be rather handling random order.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: identify does not work as option for convert
As a FYI...
info: will save the image through the 'identify' function
-verbose flag modifies this behavour (bout also makes other operators more verbose, like -resize (filter), -segment, and -distort
-format will modify the output of info: just like in identify, allowing you to format and select the parts of the identify output you want.
But remeber info: is an OUTPUT IMAGE FILE FORMAT, output information rather than the actual image.
For example
Now your can use info: in the middle of a command by using -write
for example, get info AND write the image too
or write it to a file
If you want to pipeline the results you can (with the LATEST IM) ask IM to put the info into the error channel so it doesn't get mixed up in the image pipeline.
now -identify is exactly equivalent to -write info: meaning you can use it and then carry on with the operations as normal.
Better still -print {format} is equivalent to -format {format} -write info: but without an extra newline added by info:, so you need to add one, if you want one.
So their you have it
See IM Examples
http://www.imagemagick.org/Usage/files/#info
and Identify
http://www.imagemagick.org/Usage/basics/#identify
PS Both sections should probably be re-written. Anyone like to grab the HTML, update and send me back the changes
info: will save the image through the 'identify' function
-verbose flag modifies this behavour (bout also makes other operators more verbose, like -resize (filter), -segment, and -distort
-format will modify the output of info: just like in identify, allowing you to format and select the parts of the identify output you want.
But remeber info: is an OUTPUT IMAGE FILE FORMAT, output information rather than the actual image.
For example
Code: Select all
convert rose: -format 'size = %wx%h' info:
size = 70x46
for example, get info AND write the image too
Code: Select all
convert rose: -format 'size = %wx%h\n' -write info: rose.jpg
Code: Select all
convert rose: -format 'size = %wx%h\n' -write info:size.txt rose.jpg
Code: Select all
convert rose: -format 'size = %wx%h\n' -write info:fd:2 JPG:- | display
Code: Select all
convert rose: -format 'size = %wx%h' -identify -scale 200% -identify rose.jpg
size = 70x46
size = 140x92
Code: Select all
convert rose: -print 'size = %wx%h\n' -print 'PI = %[fx:atan(1,1)]\n' rose.jpg
size = 70x46
PI = 0.785398
- info: write identify output controled by -format and -verbose
- -identify or -write info: to output between image operations (to stdout).
With -write leting you specify output files or file descriptors (output format fd:2 = Standard error) - -print {format} to also include a -format string to control the output of info: (to stdout)
See IM Examples
http://www.imagemagick.org/Usage/files/#info
and Identify
http://www.imagemagick.org/Usage/basics/#identify
PS Both sections should probably be re-written. Anyone like to grab the HTML, update and send me back the changes
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/