Code: Select all
$converter = "`"C:\Program Files\Image Magick\convert.exe`""
foreach($file_path in $args)
{
$file_name = $file_path.substring(0, ($file_path.length - 4))
$command = "& $converter `"$file_path`" `"(`" `"+clone`" `"-alpha`" `"Extract`" `")`" `"-channel`" `"RGB`" `"-compose`" `"Multiply`" `"-define`" `"bmp:format=bmp3`" `"-composite`" `"$file_name.bmp`""
#echo $command
Invoke-Expression -Command $command | Out-Default
}
I've added `"-define`" `"bmp:format=bmp3`" so this script produces Bitmap v3 images. But they have only 24bpp and alpha is lost. i've tried adding `"-alpha`" `"Activate`" `"-depth`" `"32`" but it doesn't help.
PS i'm using 64-bit windows version ("recommended" download) which is actually broken.
I've copied some CORE_RL*.dll into "Image Magick\modules\coders\" to fix dll resolving issues.