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
Code: Select all
convert rose: -format 'size = %wx%h' info:
size = 70x46
Now your can use info: in the middle of a command by using -write
for example, get info AND write the image too
Code: Select all
convert rose: -format 'size = %wx%h\n' -write info: rose.jpg
or write it to a file
Code: Select all
convert rose: -format 'size = %wx%h\n' -write info:size.txt rose.jpg
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.
Code: Select all
convert rose: -format 'size = %wx%h\n' -write info:fd:2 JPG:- | display
now
-identify is exactly equivalent to
-write info: meaning you can use it and then carry on with the operations as normal.
Code: Select all
convert rose: -format 'size = %wx%h' -identify -scale 200% -identify rose.jpg
size = 70x46
size = 140x92
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.
Code: Select all
convert rose: -print 'size = %wx%h\n' -print 'PI = %[fx:atan(1,1)]\n' rose.jpg
size = 70x46
PI = 0.785398
So their you have it
- 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