Resizing image in ASP, no error but nothing happens

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
oliflorence

Resizing image in ASP, no error but nothing happens

Post 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
arisinkkonen

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

Post 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
Post Reply