Psd Layers

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.

Psd Layers

Postby klexx » 2007-07-08T15:52:10+00:00

Hi,

Currently I'm successfully extracting the layers of an psd image into seperate files. Now I have the problem that these images are only the size of the content of the layer.

Is there a way to find out the position of the content in the original layer?
My goal is to put them on a webpage one over another so that it looks like the original psd image.

I hope I made myself clear.
thx in advance
klexx
klexx
 

Re: Psd Layers

Postby klexx » 2007-07-09T11:25:58+00:00

klexx
 

Re: Psd Layers

Postby anthony » 2007-07-12T01:34:04+00:00

You can also look at using the other GIF animation techniques, which uses the same virtual canvas and canvas offsets methods (just no complex disposal methods).

http://www.imagemagick.org/Usage/anim_basics/#coalesce

Especially look at the 'gif_anim_montage' script. which 'dims' previously overlayed images, so you can see how th new image overlays and what parts it draws, relative to the other overlays.

yes this is all commandline, but it should all be directly translatable to MagickWand programming.

If you are just wanting the final image use Flatten (with the approriate background color.
http://www.imagemagick.org/Usage/mosaics/#flatten

If the individual layer are smaller. -trim will trim the edges and retain the canavs and offset information as appropriate. To remove the colors in overlays that don't chnage the results use the Transparency Optimization method
http://www.imagemagick.org/Usage/anim_opt/#opt_trans
It replaces any overlaid pixels that don't change the background (more than the current -fuzz setting) with transparency.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/
User avatar
anthony
 
Posts: 8731
Joined: 2004-05-31T19:27:03+00:00
Location: Brisbane, Australia


Return to MagickWand for PHP

Who is online

Users browsing this forum: No registered users and 1 guest