Problems with convert and asp

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
PCPete

Problems with convert and asp

Post by PCPete »

I installed the latest build onto our server as the current installation that was there was very old. I then ran a convert command from the command line and changed the colorspace from rgb - cmyk. It worked without a hitch. I then wanted to test this with my asp page. I setup a small test that creates the imageMagick object, then ensures that it is not null. At that point, I try the convert function again, I believe I am struggling with the correct syntax within asp. I tried mimicking what I thought would work based on the command line success, only nothing I've tried works, and it seems it's quite possible to crash IIS some how by entering in an incorrect command.

Could anyone provide me with the correct asp syntax for converting a colorspace? Also, can anyone tell me what exactly would cause IIS to completely bomb (it's not just my test site that fails, it stopped ALL sites under IIS, and then it wouldn't even let me into the IIS admin panel. I could not stop or restart it, I had to reboot.) so this is clearly not ideal, though quite possibly just my lack of knowledge with respect to what I've done. The code below is what causes the crash.

Code: Select all

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
set objIM = Server.CreateObject("ImageMagickObject.MagickImage.1")
if IsNull(objIM) then 
    Response.Write("FATAL ERROR:  Could not create object to work with graphic!  Please contact support") 
else
	objIM.convert "-colorspace RGB C:\inetpub\wwwroot\dotnet\14.jpg C:\inetpub\wwwroot\dotnet\14_rgb.jpg"
end if
%>
Thank you in advanced for a wonderful program and your help.
Post Reply