avalanche123/Imagine — pull request #132 by romainneutron (2012-06-04 14:23:43+00:00)
Title: Merge layers before saving files (fix issue #131)

Hello,

This PR fix the issue #131 : If you open a multi layered PSD file, and saves it as myfile.png, you'll end with as many "myfile.png.0 myfile.png.1" as there are layers.

This PR add a flatten private method for Imagick and Gmagick and flatten the image before saving it.

By the way, it solveq a bug (?!), because the ImageMagick::flattenImages() was mis-implemented.

```php
flattenImages();
// instead of
$gmagick_obj->flattenImages();
```

Romain