```
$image = "[...]"; //binary string containing PNG image
$file = fopen('image.tmp', 'wb');
fputs($file, $image);
fclose($file);
$image = new Imagick('PNG:image.tmp');
$image->thumbnailImage($width, $height);
$image->setImageFormat('jpg');
$image->setCompressionQuality(97);
$image->writeImage('image.jpg');

```

The above doesn't work and gives me a black image for [this](http://upload.wikimedia.org/wikipedia/de/thumb/5/50/Adidas_klassisches_logo.svg/220px-Adidas_klassisches_logo.svg.png) image. When doing instead

```
[...]
$image->setImageFormat('png');
$image->setCompressionQuality(97);
$image->writeImage('image.png');

```

all is fine again. I think it has to do something with transparent background, which isn't available in JPG format. Can anyone help to solve this (imagick isn't documented very well, so I don't know how to help myself).