Hum, a better way (as it seems that depending on the imagick version, this solution may not work) :

            // remove alpha channel
            //@todo Palpix fix transparence PNG
            if (method_exists($img, 'setImageAlphaChannel') AND defined('Imagick::ALPHACHANNEL_DEACTIVATE')) {
                $imga->setImageAlphaChannel(Imagick::ALPHACHANNEL_DEACTIVATE);
            } else if (method_exists($imga, 'setImageMatte')) {
                $imga->setImageMatte(false);
            } else {
                $imga->separateImageChannel(39); // 39 = (imagick::CHANNEL_ALL & ~(imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE));
            }
            $imga->setImageFormat('png');
            $imga->writeImage($tempfile_plain);

See bug #754