Converting PSDs takes 10 times as long

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
rzuris

Converting PSDs takes 10 times as long

Post by rzuris »

I converted a 54Mb PSD with 5 layers to JPEG in about 3 minutes on a CentOS 4 server using ImageMagick 6.3.5. I then upgraded to 6.4.1-3 and the same conversion took 28 minutes. On a Mac Xserve with ImageMagick 6.3.7, PSD-to-JPEG conversions are regularly taking half an hour or longer. Should I revert to 6.3.5 on all servers? Is there a known issue with PSD convert performance?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting PSDs takes 10 times as long

Post by magick »

Can you post a URL to your image here so we can download it and reproduce the problem. Once we do, we will account for the time difference and apply a patch to fix the problem.
rzuris

Re: Converting PSDs takes 10 times as long

Post by rzuris »

Cool, thanks! I will ask the image owner for permission to post and then give you a URL to download it.

This is the same image with the layer offset problem on Linux reported in a separate message, so maybe you can kill two birds with one stone?
rzuris

Re: Converting PSDs takes 10 times as long

Post by rzuris »

I received permission to post a URL privately, with the condition that you destroy the image when you are done debugging with it. I can email you the URL; please let me know what email address to use. thanks!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting PSDs takes 10 times as long

Post by magick »

Send a PM to this address with a URL to your image so we can download it. We will of course destroy it once we resolve the problem.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting PSDs takes 10 times as long

Post by magick »

We tried converting your image as follows with ImageMagick 6.4.1-4 Beta:
  • convert "09_KX100_LF.psd[0]" 09_KX100_LF.jpg
and it converted in 1 minute (3Ghz Intel, 2GB memory). This command:
  • convert 09_KX100_LF.psd[0] 09_KX100_LF.tif
ran in 1 minute 4 seconds.
rzuris

Re: Converting PSDs takes 10 times as long

Post by rzuris »

Try this:

convert -limit map 256 -limit memory 256 -colorspace RGB -flatten -scale "10000x10000>" -scale "1000x1000<" -quality 95 09_KX1000_LF.psd 09_KX100_LF.jpg

That takes 25 minutes on our somewhat wimpy VM with CentOS 4.5.

Even on my 3GHz Intel desktop with Windows XP, this takes a long time:

convert -limit map 1024 -limit memory 1024 -quality 95 09_KX100_LF.psd[0] 09_KX100_LF.jpg

On version 6.3.5, this was all pretty fast, but is taking way longer on 6.5.1.

We need to throttle memory usage with -limit because we queue up several instances of ImageMagick on each server.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting PSDs takes 10 times as long

Post by magick »

Try this:
  • convert -limit map 256mb -limit memory 256mb -colorspace RGB -flatten -scale "10000x10000>" -scale "1000x1000<" -quality 95 09_KX1000_LF.psd 09_KX100_LF.jpg
If ImageMagick is forced to cache the pixels to disk, processing time will increase dramatically.
rzuris

Re: Converting PSDs takes 10 times as long

Post by rzuris »

Ack! I see from your note that it is necessary to qualify the numbers for -limit with "mb". Didn't it used to default to megabytes without specifying? I could certainly see that being responsible for the slowdown. It seems to be back to normal speed with "mb." When was this changed?
Post Reply