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.
Layers positioning in PSD file
Re: Layers positioning in PSD file
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
> the wand interface has no access to the positioning
How 'bout MagickSetPage()?
How 'bout MagickSetPage()?
Re: Layers positioning in PSD file
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.
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.