Get size of layered PSD file ?

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
nsh
Posts: 27
Joined: 2006-05-16T01:52:23-07:00

Get size of layered PSD file ?

Post by nsh »

Hi, i'm trying to get the width and height out of a PSD file, but only get size of one layer.

I'm trying to do this with this code:

magick_merged_wand=NewMagickWand();
magick_merged_wand=MagickMergeImageLayers(magick_wand,MergeLayer);
*width = MagickGetImageWidth(magick_merged_wand);
*height = MagickGetImageHeight(magick_merged_wand);

The org image is 1280 x 720 pxl, but i get 615 x 77 (the size of one Layer)
nsh
Posts: 27
Joined: 2006-05-16T01:52:23-07:00

Re: Get size of layered PSD file ?

Post by nsh »

using MosaicLayer as method,is better, but still returns not the exact size of the org image

magick_merged_wand=MagickMergeImageLayers(magick_wand,MosaicLayer);
*width = MagickGetImageWidth(magick_merged_wand);
*height = MagickGetImageHeight(magick_merged_wand);
Post Reply