GD resize() transparent png images

When I resize images using the built in GD library resize(), the transparancy becomes a black background. How can I keep the transparency?

$image = new Phalcon\Image\Adapter\GD("upload/test.jpg");
$image->resize(200, 200);
if ($image->save()) {
    echo 'success';

edited Jul '14

I tried it with PNG, the code above is just an example from the phalcon website. The resize with PNG does works but instead of keeping the transparency the background becomes black. Is there a solution in phalcon?

edited Oct '16

I have the same problem with transparency in png images. Issue appears while using GD adapter only. Imagick become a solution for me.