Page 1 of 1

Layers positioning in PSD file

Posted: 2015-12-16T09:59:21-07:00
by ggarra13
I have coded a reader and viewer for the multiple layers of a PSD file using ImageMagick. All works well, except for a detail. All the layers start at coordinate 0,0. When these layers are brought in GIMP, you can see them positioned (and scaled?) somewhere else. I would like to show my layers just like Photoshop or GIMP do.
I currently cannot find any GetImage function to obtain the, I believe its called, geometry attribute.

Re: Layers positioning in PSD file

Posted: 2015-12-18T08:13:29-07:00
by ggarra13
I solved it. For what its worth, the wand interface has no access to the positioning. It is needed to use the low level api. Getting an Image, the image->page.x, image->page.y, image->page.width, image->page.height contain the bounding box of the layer.

Re: Layers positioning in PSD file

Posted: 2015-12-18T08:37:04-07:00
by magick
> the wand interface has no access to the positioning

How 'bout MagickSetPage()?

Re: Layers positioning in PSD file

Posted: 2015-12-26T08:41:19-07:00
by ggarra13
I missed MagickGetPage, but on trying it, MagickGetPage does not work. It returns all 0 to all values.

Still, I am confused. I am looking for the, in OpenEXR parlance, the data window and the display window. That is, the data window is the area where the image has information. The display window is the canvas size (the area where the data window is displayed).

For example, a ball of 32 pixels in size has a data window of 32 pixels. However, it is on a field (on another layer), which is 1024 pixels in size (the display window).

The page->x and page->width return the data window, but there's no information on the display window.