Discussion:
[GM-help] Progressive JPEG's
Jeff Jacober
2003-06-27 20:29:43 UTC
Permalink
Quick question.

Can I make progressive JPEG's with GM, and if so, how would I do this?

Thanks,

Jeff J
Glenn Randers-Pehrson
2003-06-27 20:34:50 UTC
Permalink
Post by Jeff Jacober
Quick question.
Can I make progressive JPEG's with GM, and if so, how would I do this?
Try

gm convert image -interlace plane progressive.jpg

Glenn
Glenn Randers-Pehrson
2003-06-27 21:21:44 UTC
Permalink
Post by Jeff Jacober
Thanks Glenn, but I'm still not quite sure if this achieves what I would
like.
gm convert image -interlace plane progressive.jpg
I assume 'image' has to be an raw RGB file.
No, it can be any kind of image, even another JPEG.
Post by Jeff Jacober
And if I read the
documentation correctly for the -interlace option, this command will
create a JPEG where the image is stored in the plane-interlaced format
(RRR...,GGG...,BBB...). If this were then interpreted as a 'progressive
JPEG', would it not be one where the red plane is first loaded, then the
green plane information is added, and finally the blue?
The -interlace option is also used to select sequential versus progressive
JPEGS (or noninterlaced versus interlaced PNGs). See the last sentence
of the section you were reading.
Post by Jeff Jacober
What I would like to achieve is something different. Assume I have a
12000x12000 pixel image. I would like to create a progressive JPEG where
the first 'plane' is a sampled down version of my image (take the
original and sample it to say, 3000x3000), and the final plane is the
full image. When the image is served to a browser, the first 'low-res'
version would be displayed first, while the full-res version loads.
Possible?
Yes, that's what you will get if you try the "-interlace plane" option.

Glenn
Paul Pritchard
2003-06-27 20:51:37 UTC
Permalink
I'm having trouble understand what's happening here. Here's what I'm
doing.

1) I'm testing on two different servers running Windows 2000 and IIS. I
have installed the complete GraphicsMagick package on both servers
(GraphicsMagick-1.0.2-Q8-windows-static.exe) and the GhostSript package
(gs800w32.exe).

2) I have an ASP script that uses the ImageMagickObject to resize a
file:

<%
Set objImage = Server.CreateObject("ImageMagickObject.MagickImage.1")
strMsg = objImage.Convert("d:\temp\test.gif", "-resize", "120x120",
"-format", "gif", "d:\temp\new.gif")
Set objImage = Nothing
%>

3) The above works fine on both servers.

4) I then try doing the same conversion, but with an EPS file:

<%
Set objImage = Server.CreateObject("ImageMagickObject.MagickImage.1")
strMsg = objImage.Convert("d:\temp\test.eps", "-resize", "120x120",
"-format", "gif", "d:\temp\new.gif")
Set objImage = Nothing
%>

5) This works fine on server A. On server B, it works fine once, but
thereafter throws an exception (apparently, an unhandled exception). If
I stop and restart IIS, it works again, one time, then starts throwing
exceptions.

6) When I run the same conversion from the command line using GM.EXE, or
with a VBS script, it works fine. So I know it's not an issue with the
configuration of GS or the ImageMagickObject.

So based on this, I'm assuming it's some kind of problem with GS, or
with the ImageMagickObject's calls to GS, and has something to do with
running under IIS/ASP. What's weird is that it's OK on one server but
not on the other. I've looked for differences in the configurations of
the servers but haven't found anything that will fix the problem.

I'm pulling my hair out over this one! Any help or suggestions would be
very much appreciated.

--Paul
Jeff Jacober
2003-06-27 21:05:24 UTC
Permalink
Thanks Glenn, but I'm still not quite sure if this achieves what I would
like.

If I use:

gm convert image -interlace plane progressive.jpg

I assume 'image' has to be an raw RGB file. And if I read the
documentation correctly for the -interlace option, this command will
create a JPEG where the image is stored in the plane-interlaced format
(RRR...,GGG...,BBB...). If this were then interpreted as a 'progressive
JPEG', would it not be one where the red plane is first loaded, then the
green plane information is added, and finally the blue?

What I would like to achieve is something different. Assume I have a
12000x12000 pixel image. I would like to create a progressive JPEG where
the first 'plane' is a sampled down version of my image (take the
original and sample it to say, 3000x3000), and the final plane is the
full image. When the image is served to a browser, the first 'low-res'
version would be displayed first, while the full-res version loads.

Possible?

Jeff J


-----Original Message-----
From: Glenn Randers-Pehrson <***@comcast.net>
To: graphicsmagick-***@lists.sourceforge.net
Date: Fri, 27 Jun 2003 16:34:50 -0400
Subject: Re: [GM-help] Progressive JPEG's
Post by Glenn Randers-Pehrson
Post by Jeff Jacober
Quick question.
Can I make progressive JPEG's with GM, and if so, how would I do this?
Try
gm convert image -interlace plane progressive.jpg
Glenn
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/0
1
_______________________________________________
Graphicsmagick-help mailing list
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
Bob Friesenhahn
2003-06-27 21:52:20 UTC
Permalink
Post by Glenn Randers-Pehrson
Post by Jeff Jacober
What I would like to achieve is something different. Assume I have a
12000x12000 pixel image. I would like to create a progressive JPEG where
the first 'plane' is a sampled down version of my image (take the
original and sample it to say, 3000x3000), and the final plane is the
full image. When the image is served to a browser, the first 'low-res'
version would be displayed first, while the full-res version loads.
Possible?
Yes, that's what you will get if you try the "-interlace plane" option.
Yes indeed, but this is best for images which are smaller than the
user's screen. 12000x12000 is kind of big ...

Bob
======================================
Bob Friesenhahn
***@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
Bob Friesenhahn
2003-06-27 21:51:08 UTC
Permalink
Post by Jeff Jacober
Thanks Glenn, but I'm still not quite sure if this achieves what I would
like.
gm convert image -interlace plane progressive.jpg
I assume 'image' has to be an raw RGB file. And if I read the
documentation correctly for the -interlace option, this command will
create a JPEG where the image is stored in the plane-interlaced format
(RRR...,GGG...,BBB...). If this were then interpreted as a 'progressive
JPEG', would it not be one where the red plane is first loaded, then the
green plane information is added, and finally the blue?
What I would like to achieve is something different. Assume I have a
12000x12000 pixel image. I would like to create a progressive JPEG where
the first 'plane' is a sampled down version of my image (take the
original and sample it to say, 3000x3000), and the final plane is the
full image. When the image is served to a browser, the first 'low-res'
version would be displayed first, while the full-res version loads.
You have to work within the limits of both the format and the browser.
JPEG is only capable of storing a single image, although it is
possible to request multiple resolutions of the image once you
have the complete JPEG file. I am not aware of any browser which
supports requesting a subresolution of a JPEG image so JPEG's
capability won't help you unless you write your own browser.

There is an old Netscape HTML hack which allows a low-rez image to be
loaded prior to the high-rez image. I forget the syntax. I don't
recall that it was terribly effective.

You could use Javascript to accomplish quite a bit more. Javascript
could be used to load a low-resolution image but the HTML could claim
that it is larger so that most browsers will scale the image to fit.
After a larger image has been loaded, the page would auto-update to
display the larger image. The key here is if Javascript can provide
your script with a notification once the image is loaded so that it
can display the larger image.

Note that many/most browsers will fail to display a 12000x12000 pixel
image, and it might even crash the user's computer.

If you have control over the server side, then it is good to know that
GraphicsMagick's "MPC" format supports lightning fast reads and crops
so that if your large image is available to the server in MPC format,
then it is quite easy to crop a portion of the image and return it to
the user's browser as a smaller JPEG (returning a cropped region as
JPEG should take less than 1/10th of a second on a typical server).
Some browser-side logic (or server-side CGI form logic) can determine
what region of the image should be requested and displayed. This
approach is commonly used for map images, which can be *huge*.

By providing MPC files on the server which are pre-scaled to several
different resolutions, the user can be allowed to "zoom" in and out
with very little load on the server.

The drawbacks of MPC are:

o It actually uses two files rather than one (a file.mpc and a
file.cache file).
o The format is architecture specific so it is not a usable archive
format.
o The image data is in the *exact* format used in memory by
GraphicsMagick so it is uncompressed, and takes lots of space.
o MPC can't be effectively stored in a database like JPEG and PNG
can.

It seems that many sites use a method whereby the large image is diced
into small tiles in varying resolutions, and then the web server
program determines which tiles are required, composites them together,
and returns the result to the browser. This method is used by ESPN's
lake mapping interface. This approach takes a lot of logic, while
using MPC takes just a few lines of code, so I think that if the disk
space is available, using MPC is preferrable over a method which
requires thousands of small files.

Bob
======================================
Bob Friesenhahn
***@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
Hugh Brackett
2003-06-27 22:19:54 UTC
Permalink
To pick up on what Bob said, large images are very demanding. There are
folks
using GM for very large images. I think they run 2GB or more of RAM.
The Q8 builds use half the memory and should be fine for feeding
images to web browsers.
Post by Jeff Jacober
-----Original Message-----
Friesenhahn
Sent: Friday, June 27, 2003 5:52 PM
Subject: Re: [GM-help] Progressive JPEG's
Post by Glenn Randers-Pehrson
Post by Jeff Jacober
What I would like to achieve is something different. Assume I have a
12000x12000 pixel image. I would like to create a progressive
JPEG where
Post by Glenn Randers-Pehrson
Post by Jeff Jacober
the first 'plane' is a sampled down version of my image (take the
original and sample it to say, 3000x3000), and the final plane is the
full image. When the image is served to a browser, the first 'low-res'
version would be displayed first, while the full-res version loads.
Possible?
Yes, that's what you will get if you try the "-interlace plane" option.
Yes indeed, but this is best for images which are smaller than the
user's screen. 12000x12000 is kind of big ...
Bob
======================================
Bob Friesenhahn
http://www.simplesystems.org/users/bfriesen
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Graphicsmagick-help mailing list
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
Jeff Jacober
2003-06-27 22:18:16 UTC
Permalink
Ok, I agree my example of a 12000x12000 pixel image was kind of silly. I
only intend to use this on screen sized images.

When I try:

gm convert image1.tif -interlace plane progressive.jpg

where image1.tif is a 1000x1000px image, the result is not any different
APPEARING (viewed in IE 6) from when I use:

gm convert image1.tif progressive.jpg

If I identify the two images, I see one is 'Interlace: Plane' and the
other is 'Interlace: None'. Otherwise, they are identical to me. I
assume the difference will only be noticed when the image is transfered
over a slow connection giving time for the low res image to be needed.
Also, curiously, the progressive image is only 319kb while the non-
progressive one is 339kb. I would have expected the progressive one to
be larger.

At any rate, thanks as always for your advice. Much appreciated.

Jeff J

-----Original Message-----
From: Glenn Randers-Pehrson <***@comcast.net>
To: graphicsmagick-***@lists.sourceforge.net
Date: Fri, 27 Jun 2003 17:21:44 -0400
Subject: Re: [GM-help] Progressive JPEG's
Post by Glenn Randers-Pehrson
Post by Jeff Jacober
Thanks Glenn, but I'm still not quite sure if this achieves what I
would
Post by Jeff Jacober
like.
gm convert image -interlace plane progressive.jpg
I assume 'image' has to be an raw RGB file.
No, it can be any kind of image, even another JPEG.
Post by Jeff Jacober
And if I read the
documentation correctly for the -interlace option, this command will
create a JPEG where the image is stored in the plane-interlaced format
(RRR...,GGG...,BBB...). If this were then interpreted as a
'progressive
Post by Jeff Jacober
JPEG', would it not be one where the red plane is first loaded, then
the
Post by Jeff Jacober
green plane information is added, and finally the blue?
The -interlace option is also used to select sequential versus
progressive
JPEGS (or noninterlaced versus interlaced PNGs). See the last sentence
of the section you were reading.
Post by Jeff Jacober
What I would like to achieve is something different. Assume I have a
12000x12000 pixel image. I would like to create a progressive JPEG
where
Post by Jeff Jacober
the first 'plane' is a sampled down version of my image (take the
original and sample it to say, 3000x3000), and the final plane is the
full image. When the image is served to a browser, the first
'low-res'
Post by Jeff Jacober
version would be displayed first, while the full-res version loads.
Possible?
Yes, that's what you will get if you try the "-interlace plane" option.
Glenn
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/0
1
_______________________________________________
Graphicsmagick-help mailing list
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
Bob Friesenhahn
2003-06-27 22:38:39 UTC
Permalink
Browsers normally cache images so if the image has been loaded once,
you won't see any progressive display in subsequent loads. In fact,
it may load the image fast enough from local storage that you don't
see the progressive display, or the brower may intentionally not
display the image progressively since displaying the image
progressively takes much more CPU time in the client.

Years ago I noticed that loading progressive images took substantially
longer than non-progressive ones because the browser shows the pixels
being updated as they are transferred. With today's fast CPUs, that
is probably less of an issue.

Bob
Post by Jeff Jacober
Ok, I agree my example of a 12000x12000 pixel image was kind of silly. I
only intend to use this on screen sized images.
gm convert image1.tif -interlace plane progressive.jpg
where image1.tif is a 1000x1000px image, the result is not any different
gm convert image1.tif progressive.jpg
If I identify the two images, I see one is 'Interlace: Plane' and the
other is 'Interlace: None'. Otherwise, they are identical to me. I
assume the difference will only be noticed when the image is transfered
over a slow connection giving time for the low res image to be needed.
Also, curiously, the progressive image is only 319kb while the non-
progressive one is 339kb. I would have expected the progressive one to
be larger.
At any rate, thanks as always for your advice. Much appreciated.
Jeff J
======================================
Bob Friesenhahn
***@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
Bob Friesenhahn
2003-06-27 22:34:12 UTC
Permalink
Post by Hugh Brackett
To pick up on what Bob said, large images are very demanding. There are
folks
using GM for very large images. I think they run 2GB or more of RAM.
The Q8 builds use half the memory and should be fine for feeding
images to web browsers.
This is yet another reason why the MPC format is so cool. MPC files
are essentially "pre-read" images, similar to the huge files that
users often complain about in their system's temporary file directory.
The data is available almost immediately after the file is opened.
If the file size is small enough to be memory mapped (under 2GB on a
32-bit system) then frequently accessed portions of the image are also
cached in RAM by the system's VM subsystem, making access even faster.

If disk is cheap (as many people say) then the master images can
simply be converted to discardable MPC versions prior to use by the
server so that all of the heavy-lifting is done in advance.

It is true that the Q8 builds use 1/2 the memory of the Q16 builds.
The associated MPC files are also 1/2 the size.

Bob
======================================
Bob Friesenhahn
***@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
Hugh Brackett
2003-06-27 21:49:47 UTC
Permalink
The amazing Carnac predicts:

Server A has
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Always
UnloadDLL = 1 (DWORD)

Server B has
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Always
UnloadDLL = 0 or not present

(the amazing Carnac is only guessing)
Cross checked with Magic 8-Ball: "You may rely on it."

I pretty regularly see advice to stay away from GS 8.

May your processors multiply without exception.
-----Original Message-----
From: graphicsmagick-help-***@lists.sourceforge.net
[mailto:graphicsmagick-help-***@lists.sourceforge.net]On Behalf Of Paul
Pritchard
Sent: Friday, June 27, 2003 4:52 PM
To: graphicsmagick-***@lists.sourceforge.net
Subject: [GM-help] Odd problem with ImageMagickObject and GS


I'm having trouble understand what's happening here. Here's what I'm
doing.

1) I'm testing on two different servers running Windows 2000 and IIS. I
have installed the complete GraphicsMagick package on both servers
(GraphicsMagick-1.0.2-Q8-windows-static.exe) and the GhostSript package
(gs800w32.exe).

2) I have an ASP script that uses the ImageMagickObject to resize a file:

<%
Set objImage = Server.CreateObject("ImageMagickObject.MagickImage.1")
strMsg = objImage.Convert("d:\temp\test.gif", "-resize", "120x120",
"-format", "gif", "d:\temp\new.gif")
Set objImage = Nothing
%>

3) The above works fine on both servers.

4) I then try doing the same conversion, but with an EPS file:

<%
Set objImage = Server.CreateObject("ImageMagickObject.MagickImage.1")
strMsg = objImage.Convert("d:\temp\test.eps", "-resize", "120x120",
"-format", "gif", "d:\temp\new.gif")
Set objImage = Nothing
%>

5) This works fine on server A. On server B, it works fine once, but
thereafter throws an exception (apparently, an unhandled exception). If I
stop and restart IIS, it works again, one time, then starts throwing
exceptions.

6) When I run the same conversion from the command line using GM.EXE, or
with a VBS script, it works fine. So I know it's not an issue with the
configuration of GS or the ImageMagickObject.

So based on this, I'm assuming it's some kind of problem with GS, or with
the ImageMagickObject's calls to GS, and has something to do with running
under IIS/ASP. What's weird is that it's OK on one server but not on the
other. I've looked for differences in the configurations of the servers but
haven't found anything that will fix the problem.

I'm pulling my hair out over this one! Any help or suggestions would be
very much appreciated.

--Paul
Paul Pritchard
2003-06-28 01:24:41 UTC
Permalink
Both servers have that registry key "not present".

Is there a different version of GS I should be using?

--Paul

----- Original Message -----
From: Hugh <mailto:***@citi-us.com> Brackett
To: graphicsmagick-***@lists.sourceforge.net
<mailto:graphicsmagick-***@lists.sourceforge.net>
Sent: Friday, June 27, 2003 4:49 PM
Subject: RE: [GM-help] Odd problem with ImageMagickObject and GS

The amazing Carnac predicts:

Server A has
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Al
waysUnloadDLL = 1 (DWORD)

Server B has
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Al
waysUnloadDLL = 0 or not present

(the amazing Carnac is only guessing)
Cross checked with Magic 8-Ball: "You may rely on it."

I pretty regularly see advice to stay away from GS 8.

May your processors multiply without exception.

-----Original Message-----
From: graphicsmagick-help-***@lists.sourceforge.net
[mailto:graphicsmagick-help-***@lists.sourceforge.net]On Behalf Of
Paul Pritchard
Sent: Friday, June 27, 2003 4:52 PM
To: graphicsmagick-***@lists.sourceforge.net
Subject: [GM-help] Odd problem with ImageMagickObject and GS


I'm having trouble understand what's happening here. Here's what I'm
doing.

1) I'm testing on two different servers running Windows 2000 and IIS. I
have installed the complete GraphicsMagick package on both servers
(GraphicsMagick-1.0.2-Q8-windows-static.exe) and the GhostSript package
(gs800w32.exe).

2) I have an ASP script that uses the ImageMagickObject to resize a
file:

<%
Set objImage = Server.CreateObject("ImageMagickObject.MagickImage.1")
strMsg = objImage.Convert("d:\temp\test.gif", "-resize", "120x120",
"-format", "gif", "d:\temp\new.gif")
Set objImage = Nothing
%>

3) The above works fine on both servers.

4) I then try doing the same conversion, but with an EPS file:

<%
Set objImage = Server.CreateObject("ImageMagickObject.MagickImage.1")
strMsg = objImage.Convert("d:\temp\test.eps", "-resize", "120x120",
"-format", "gif", "d:\temp\new.gif")
Set objImage = Nothing
%>

5) This works fine on server A. On server B, it works fine once, but
thereafter throws an exception (apparently, an unhandled exception). If
I stop and restart IIS, it works again, one time, then starts throwing
exceptions.

6) When I run the same conversion from the command line using GM.EXE, or
with a VBS script, it works fine. So I know it's not an issue with the
configuration of GS or the ImageMagickObject.

So based on this, I'm assuming it's some kind of problem with GS, or
with the ImageMagickObject's calls to GS, and has something to do with
running under IIS/ASP. What's weird is that it's OK on one server but
not on the other. I've looked for differences in the configurations of
the servers but haven't found anything that will fix the problem.

I'm pulling my hair out over this one! Any help or suggestions would be
very much appreciated.

--Paul
Bob Friesenhahn
2003-06-28 14:52:41 UTC
Permalink
Post by Paul Pritchard
Both servers have that registry key "not present".
Is there a different version of GS I should be using?
It is certainly true that Ghostscript 8.0 has more than its fair share
of bugs. Sometimes it just runs off into the weeds and never returns,
takes abnormally long, or it fails for Postscript files that work with
7.X. I recommend using 7.04 or 7.05 until the 8.0.X versions are
reliable.

Bob
======================================
Bob Friesenhahn
***@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
Hugh Brackett
2003-06-30 14:55:45 UTC
Permalink
I'll have to get that Magic 8-Ball checked. Maybe I need a Magick 8-Ball.


-----Original Message-----
From: graphicsmagick-help-***@lists.sourceforge.net
[mailto:graphicsmagick-help-***@lists.sourceforge.net]On Behalf Of Paul
Pritchard
Sent: Friday, June 27, 2003 9:25 PM
To: graphicsmagick-***@lists.sourceforge.net
Subject: Re: [GM-help] Odd problem with ImageMagickObject and GS


Both servers have that registry key "not present".

Is there a different version of GS I should be using?

--Paul
----- Original Message -----
From: Hugh Brackett
To: graphicsmagick-***@lists.sourceforge.net
Sent: Friday, June 27, 2003 4:49 PM
Subject: RE: [GM-help] Odd problem with ImageMagickObject and GS


The amazing Carnac predicts:

Server A has

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Always
UnloadDLL = 1 (DWORD)

Server B has

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Always
UnloadDLL = 0 or not present

(the amazing Carnac is only guessing)
Cross checked with Magic 8-Ball: "You may rely on it."

I pretty regularly see advice to stay away from GS 8.

May your processors multiply without exception.
-----Original Message-----
From: graphicsmagick-help-***@lists.sourceforge.net
[mailto:graphicsmagick-help-***@lists.sourceforge.net]On Behalf Of Paul
Pritchard
Sent: Friday, June 27, 2003 4:52 PM
To: graphicsmagick-***@lists.sourceforge.net
Subject: [GM-help] Odd problem with ImageMagickObject and GS


I'm having trouble understand what's happening here. Here's what I'm
doing.

1) I'm testing on two different servers running Windows 2000 and IIS.
I have installed the complete GraphicsMagick package on both servers
(GraphicsMagick-1.0.2-Q8-windows-static.exe) and the GhostSript package
(gs800w32.exe).

2) I have an ASP script that uses the ImageMagickObject to resize a
file:

<%
Set objImage = Server.CreateObject("ImageMagickObject.MagickImage.1")
strMsg = objImage.Convert("d:\temp\test.gif", "-resize", "120x120",
"-format", "gif", "d:\temp\new.gif")
Set objImage = Nothing
%>

3) The above works fine on both servers.

4) I then try doing the same conversion, but with an EPS file:

<%
Set objImage = Server.CreateObject("ImageMagickObject.MagickImage.1")
strMsg = objImage.Convert("d:\temp\test.eps", "-resize", "120x120",
"-format", "gif", "d:\temp\new.gif")
Set objImage = Nothing
%>

5) This works fine on server A. On server B, it works fine once, but
thereafter throws an exception (apparently, an unhandled exception). If I
stop and restart IIS, it works again, one time, then starts throwing
exceptions.

6) When I run the same conversion from the command line using GM.EXE,
or with a VBS script, it works fine. So I know it's not an issue with the
configuration of GS or the ImageMagickObject.

So based on this, I'm assuming it's some kind of problem with GS, or
with the ImageMagickObject's calls to GS, and has something to do with
running under IIS/ASP. What's weird is that it's OK on one server but not
on the other. I've looked for differences in the configurations of the
servers but haven't found anything that will fix the problem.

I'm pulling my hair out over this one! Any help or suggestions would
be very much appreciated.

--Paul

Loading...