If the PSD file,layers too much

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Medina
Posts: 6
Joined: 2015-12-22T02:13:21-07:00
Authentication code: 1151

If the PSD file,layers too much

Post by Medina »

My English is not good,
I was using the Google translation,
I do not know whether to read.
In the process of using ImageMagick,
If the PSD file,layers too much,
will be unable to generate JPG thumbnails,
How to solve this problem,
there is no other better way? :(
We are expecting a reply :D .
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: If the PSD file,layers too much

Post by Bonzo »

Not quite sure what you mean but posting your code and an example file may help.

With psd files you can work with different layers e.g. input.psd[0] will work with layer one which should be the combination of all the layers.
Medina
Posts: 6
Joined: 2015-12-22T02:13:21-07:00
Authentication code: 1151

Re: If the PSD file,layers too much

Post by Medina »

Bonzo wrote:Not quite sure what you mean but posting your code and an example file may help.

With psd files you can work with different layers e.g. input.psd[0] will work with layer one which should be the combination of all the layers.
I give you an example tomorrow.
I am now in the evening time.
Medina
Posts: 6
Joined: 2015-12-22T02:13:21-07:00
Authentication code: 1151

Re: If the PSD file,layers too much

Post by Medina »

Bonzo wrote:Not quite sure what you mean but posting your code and an example file may help.

With psd files you can work with different layers e.g. input.psd[0] will work with layer one which should be the combination of all the layers.
thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: If the PSD file,layers too much

Post by fmw42 »

What do you mean by "layers too much"? Do you mean you have too many layers? Do you only want to output just a few layers? If so, use the [0,1,2-4] syntax. See "selecting frames (layers or pages)" at http://www.imagemagick.org/script/comma ... essing.php
Medina
Posts: 6
Joined: 2015-12-22T02:13:21-07:00
Authentication code: 1151

Re: If the PSD file,layers too much

Post by Medina »

fmw42 wrote:What do you mean by "layers too much"? Do you mean you have too many layers? Do you only want to output just a few layers? If so, use the [0,1,2-4] syntax. See "selecting frames (layers or pages)" at http://www.imagemagick.org/script/comma ... essing.php
For example,which contains more than 300 layers,a PSD file.Could not generate JPG thumbnail.(Specifically,I have no test of how many layers)

I use the following code

Code: Select all

$img     = "uploads/2015-12-22/9edc3b47ffcef19dfce3d1c669949b8d.psd";
$yimg    = "uploads/2015-12-22/9edc3b47ffcef19dfce3d1c669949b8d.jpg";
$im = new Imagick($img);
$im->setIteratorIndex(0);
$im->setImageCompressionQuality(100); //Picture quality
$im->writeImage($yimg);
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: If the PSD file,layers too much

Post by fmw42 »

You can find out how many layers by parsing

Code: Select all

identify image.psd
It will list out each layer and you can count them.

Are you running out of memory? Do you have enough to hold twice the size of your input psd file?
Medina
Posts: 6
Joined: 2015-12-22T02:13:21-07:00
Authentication code: 1151

Re: If the PSD file,layers too much

Post by Medina »

I've been testing for a long time, and it's not a question of memory.
I'm sure more than a certain number of layers after.
Unable to properly generate JPG me test how many layers in the end after more than.

Translation tool really hurt egg:(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: If the PSD file,layers too much

Post by fmw42 »

Does it work for psd with less than 300 layers? If so, how many can you do at most? What is the file size of your psd?

What is your Imagemagick version and platform?

What do you get from

Code: Select all

convert -version
Does it contain jpg or jpeg in the Delegates? If so, what version of libjpeg?
Medina
Posts: 6
Joined: 2015-12-22T02:13:21-07:00
Authentication code: 1151

Re: If the PSD file,layers too much

Post by Medina »

Memory problems, multi-layer memory usage on the increase.
Thank guys
Post Reply