Page 1 of 1

Get size of layered PSD file ?

Posted: 2013-04-16T11:32:11-07:00
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)

Re: Get size of layered PSD file ?

Posted: 2013-04-16T13:33:32-07:00
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);