views:

434

answers:

3

Hi there,

Does anyone know about a PHP library which can produce layered PNG images? (I'm not sure, but I think that tiff image standard supports layers also)

+2  A: 

AFAIR, PNG does not support layers. MNG does and you can produce these with ImageMagick.
For PHP extension see: http://www.php.net/imagick

vartec
I think he means with backgrounds?
Dead account
yeah, but then I don't see where the problem is. GD supports that without any problems.
vartec
Fireworks uses a layered file with a PNG extension, I imagine he means that.
benlumley
Then that's some Adobe proprietary extension.
vartec
A: 

Assuming you mean the layered PNG files as per fireworks, I don't think you can do it. I've not seen anything except fireworks that supports these files properly.

benlumley
The extra information in a Fireworks PNG is contained in private ancillary chunks and I believe the format of these chunks has not been made public.
Bing
thanks for the extra info!
benlumley
+1  A: 

From the ImageMagic API site:

PHP
MagickWand for PHP a native PHP-extension to the ImageMagick MagickWand API.
IMagick is a native PHP extension to create and modify images using the ImageMagick API. Documentation for the extension is available here.
phMagick is a wrapper class for ImageMagick, wrapping the most common web image manipulation actions in easy to use functions, but allowing full access to ImageMagick's power by issuing system calls to it's command-line programs.

ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

lothar