Slow image conversion on Windows 2003 server

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
MDSYNTST

Slow image conversion on Windows 2003 server

Post by MDSYNTST »

Hello,

This is the first time that I've posted to this forum. I am using ImageMagick to convert various file formats back and forth on Windows 2003 Server and it seems to be taking a long time. However, I am very inexperienced with ImageMagick so maybe there is nothing that can be done.

At first I thought it was only EPS files that were taking a long time and I was blaming it on Ghostscript. However I have tested EPS to JPG conversion on that server with Ghostscript directly and it's pretty quick. With Ghostscript I can convert a 25MB EPS file to a JPG in about 1 or 2 seconds. With ImageMagick it takes about 15 seconds for the same file.

Here is my ImageMagick EPS to JPG command:
convert EL1234.eps EL1234.jpg (takes 15 seconds for the 25MB eps file to convert).

However, that's not a problem anymore because I can use ghostscript to speed it up. But, I also have PSD files that I need to convert to JPG and I have JPGs that I need to convert to PSDs.

Here is my PSD to JPG command:
convert EL1234.psd[0] EL1234.jpg (takes about 10 seconds for the 25MB psd to convert. I use the [0] because I believe it only converts the preview.)

I am using ImageMagick 6.5.6-4 and Ghostscript 8.70 pre-compiled for windows.

My question is, should ImageMagick convert these files any faster, or is this normal for files of this size? I have posted my PSD file for download if anyone would be willing to do a time test on it. http://www.miconnex.ca/EL1234.psd

Thanks,
Dave
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Slow image conversion on Windows 2003 server

Post by magick »

The conversion from PSD is slow under Windows. It took around 10 seconds for us as well. It only took 3 seconds on our Linux box. We tried converting the image to PNG first and then to JPEG. That conversion took about a second. We'll try to determine why PSD conversion is so slow under Windows but it may take some time to come up with an answer.
MDSYNTST

Re: Slow image conversion on Windows 2003 server

Post by MDSYNTST »

Thanks for the response and the verification that PSD files are slow under windows.

I have been playing with Ghostscript and timing and testing my results regarding EPS to JPG conversion. I have noticed that the JPG output device for Ghostscript only outputs RGB images, but most of my EPS files are CMYK and I want that colorspace retained during the conversion. I'd rather use IM than ghostscript because it seems to do a better job quality wise, but again the speed is an issue.

For example it takes 17 seconds on my windows 2003 server to convert this file: http://www.miconnex.ca/HM197.eps to a jpg.

My command is as follows:
convert HM197.eps HM197.jpg

The results are perfect in that it retains the CMYK colorspace but it takes too long for my purpose. Can you please verify that EPS to JPG conversion on windows is also slow, or do I have a config problem somewhere?

Again, Ghostscript 8.70 and IM 6.5.6-4.

It seems to me that it should be nearly as fast as Ghostscript which takes about 2 seconds for the conversion. Once IM has the raster file from Ghostscript I would think IM would need another couple of seconds to render the correct JPG, but maybe I'm wrong.

Thanks in advance for your assistance.

Dave
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Slow image conversion on Windows 2003 server

Post by magick »

Add -verbose to your command line. ImageMagick displays the Ghostscript command its uses for the conversion.

We tried your image under the latest Fedora Linux release and it took just over 3 seconds.
MDSYNTST

Re: Slow image conversion on Windows 2003 server

Post by MDSYNTST »

Here is the output of the -verbose switch as requested:


C:\Documents and Settings\Administrator\Desktop\test>convert -verbose HM197.eps
HM197.jpg
[ghostscript library] Files/gs/gs8.70/bin/gswin32c.exe" -q -dQUIET -dPARANOIDSAF
ER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=
0 -dGridFitTT=0 "-sDEVICE=bmpsep8" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r30
0x300" -g2283x2208 "-sOutputFile=C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/2/magick-9H
SabGPi" "-fC:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/2/magick-Dh_tY0MQ" "-fC:/DOCUME~1/
ADMINI~1/LOCALS~1/Temp/2/magick-MIoSVtyx"C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/2/ma
gick-9HSabGPi[0] BMP 2283x2208 2283x2208+0+0 8-bit PseudoClass 256c 19.24mb 0.23
4u 0:01
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/2/magick-9HSabGPi[1] BMP 2283x2208 2283x2208+
0+0 8-bit PseudoClass 256c 19.24mb 0.203u 0:01
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/2/magick-9HSabGPi[2] BMP 2283x2208 2283x2208+
0+0 8-bit PseudoClass 256c 19.24mb 0.125u 0:01
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/2/magick-9HSabGPi[3] BMP 2283x2208 2283x2208+
0+0 8-bit PseudoClass 256c 19.24mb 0.063u 0:01
HM197.eps PS 2282x2208=>2283x2208 2283x2208+0+0 16-bit DirectClass 0.219u 0:01
HM197.eps=>HM197.jpg PS 2282x2208=>2283x2208 2283x2208+0+0 16-bit DirectClass 3.
172mb 0.734u 0:01

I'm not sure if this is relevant, but when I ran the command most of the waiting happened before any output showed up on the screen. Does IM wait until the entire operation is finished before it posts its output, or does the delay indicate the the problem is before ghostscript even executes?

Thanks again for your help.
Dave
Post Reply