Page 1 of 1

Resizing image in ASP, no error but nothing happens

Posted: 2009-11-20T05:12:04-07:00
by oliflorence
Hi,
Brand new to ImageMagick!

I want to resize a JPG and output in the same folder in ASP on a windows server, I have found the following script to do so, have installed the COM and registered during installation and the folder where the script runs and the image folder have write permissions.
When i run the file, nothing happens, I do not get an error but the thumbnail is not created either.

Here is the script I have:

Code: Select all

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%

Set Img = Server.CreateObject("ImageMagickObject.MagickImage.1") 
Img.Convert "img/img1.jpg", "resize=300x225!","img/img1_small.jpg"

%> 
Done!
Also, I could find any doc for the various options I can use in ASP, ideally I would like to specify the width of the image and have the high resized in proportion.

Many thanks for any help

Re: Resizing image in ASP, no error but nothing happens

Posted: 2009-12-11T06:27:09-07:00
by arisinkkonen
Your code is almost perfect, here's 100% working line:

Img.Convert "img/img1.jpg", "-resize=300x225!","img/img1_small.jpg"

..and it's a good idea to provide absolute path info for the script, something like: D:/folder/anotherfolder/img1.jpg