Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.5

Request #9333 Add flatten() method to Imagick2 driver
Submitted: 2006-11-14 19:58 UTC
From: gauthierm Assigned:
Status: Feedback Package: Image_Transform (version CVS)
PHP Version: Irrelevant OS: Linux
Roadmaps: 0.10.0    
Subscription  


 [2006-11-14 19:58 UTC] gauthierm (Michael Gauthier)
Description: ------------ ImageMagick's flatten option is useful for converting images with multiple layers (transparent TIFF for example) to images without layer support (like JPEG). The PECL Imagick extension supports this through the imagick_flatten() function. The following patch adds this capability to the Imagick2 transform driver as a method. http://worksintheory.org/files/pear/Image-Transform-imagick-flatten-14112006.diff

Comments

 [2008-04-06 08:23 UTC] doconnor (Daniel O'Connor)
Hey Michael, Is your patch is out of date? Isn't it Imagick Imagick::flattenImages() now?
 [2008-04-06 12:22 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Daniel please don't mix imagick v1 and v2 ... Mike is doing it against v1 (which ironically is imagick2 in the class), the method you are talking about is already in imagick3 driver I'll throw the ball to phillipe
 [2008-04-28 21:58 UTC] cweiske (Christian Weiske)
Aren't those images automatically flattened when saving to png or jpg? If not, flatten should be called when resizing/saving automatically. If yes, the patch is unneeded.
 [2008-04-28 22:54 UTC] gauthierm (Michael Gauthier)
At the time I filed the bug, when a transparent tiff was converted, the background was not combined with the alpha channel when saving as png/jpeg. This caused black backgrounds for some tiff files rather than the specified background color.