ImageMagick: What is this convert-command doing?

CUPID

New Member
I'm trying to port a PHP script to Ruby and until now I only used ImageMagick to convert from one file-format to another. Meaning: Yes, I'm an ImageMagick newbie. ;-) Somewhere inside the PHP script the following code is executed:\[code\]$output = array();$returnValue = http://stackoverflow.com/questions/3942046/0;$cmd ='convert '.$pngFile->path.' -resize 1x1 -alpha on -channel o -format "%[fx:u.a]" info:'exec($cmd, $output, $returnValue);\[/code\]Using the ImageMagick documentation for convert I identified the following options:
  • \[code\]-resize 1x1\[/code\] Resize to 1x1 pixels (right?)
  • \[code\]-alpha on\[/code\] Activate alpha-channel
  • \[code\]-channel o\[/code\] Apply options to the opacity image-channel
My questions:[*]What does \[code\]-format "%[fx:u.a]"\[/code\] exactly do? I know that \[code\]u\[/code\] is a symbol for first image in sequence and \[code\]a\[/code\] one for alpha. But I don't get what the whole expression really does.[*]What does \[code\]info:\[/code\] stand for?[*]What does this convert-command exactly do?Thank you very much for your kind help.Please note: The accepted answer on the following question has a very good answer to this question:Understanding ImageMagick's convert and translating to Ruby RMagick
 
Back
Top