Page 1 of 1

convert -get attribute myvariable

Posted: 2007-10-13T07:58:39-07:00
by dmafackler
Is there a mechanism to read (get) and re-use image attributes in the "convert" pipeline?

i.e. hypothetically:

convert \(srcImage.tif -get height\) \(virtualRuler.tif -crop x%[height]+0+0\) +append srcPlusRuler.tif

I would like to take the attributes of a template image and apply them to another image.

For example: take a ruler image, appropriately scale it, and place it next to the calibrated content of a geophysical image. In this case the calibrating attributes of the 2nd are used to appropriately scale and set the attributes of the 1st before appending the two together.

Understood that this can be accomplished:

* Under *nix'ish shells using back-quoted identify commands
* Or via one of the ImageMagick language APIs (Perl, PHP, C/C++)

but am looking for a cleaner command-line solution under Windows, if such exists.

Re: convert -get attribute myvariable

Posted: 2007-10-16T18:06:11-07:00
by anthony
At the moment it is the API that does that sort of work. The backquotes for commandline, or variables in other API's.

sorry, windows scripting is braindead!