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