473,394 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

COM object for image processing in ASP

Hi all,

I've been using ASPImage and it frequently causes IIS to crash. Do any
of you have a good alternative to suggest?

I need something to handle resizing and cropping.

Any suggestions would be much appreciated.

Thanks,

Paul

May 31 '06 #1
1 1453
On Tue, 30 May 2006 19:33:20 -0500, Paul <pa*********@gmail.com> wrote:
Hi all,

I've been using ASPImage and it frequently causes IIS to crash. Do any
of you have a good alternative to suggest?

I need something to handle resizing and cropping.


ImageMagick includes a COM object that may be suitable. The COM object
itself isn't particularly well-documented, but most of the functionality
it offers can be gleaned from the documentation for the command line
tools. I have included at the end of this article an example that will
create 64x64 thumbnails of all the images in the current directory.

http://www.imagemagick.org/script/index.php

Example follows:
Option Explicit

' = Function: Resize =
' Use an instance of the ImageMagickObject to change the dimensions of
' an image, preserving its aspect ratio.
'
' Arguments:
' im - An instance of the ImageMagickObject.
' src - The name of the source file.
' dst - The name of the destination file.
' width - The desired maximum width
' height - The desired maximum height
Function Resize(im, src, dst, width, height)
Dim msgs
msgs = im.Convert(src, "-resize", width & "x" & height, dst)
End Function

' = Function: Main =
' The entry point for the script.
'
' Returns:
' The script exit code
Function Main()
Dim im, fso, wd, file

Set im = CreateObject("ImageMagickObject.MagickImage.1")
Set fso = CreateObject("Scripting.FileSystemObject")
Set wd = fso.GetFolder(".")

For Each file In wd.Files
On Error Resume Next
Resize im, file.Name, "thumb_" & file.Name, 64, 64
On Error Goto 0
Next

Main = 0
End Function

WScript.Quit Main()
--
Justin Piper
Bizco Technologies
http://www.bizco.com/
May 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Markus von Ehr | last post by:
Hi, in a data acquisition program I have several threads, one thread grabbing images and another doing some processing. I'd like to make my own image class containing the image and additional...
1
by: jasonshohet | last post by:
I read recently that: "if a before-image was made before an interruption in database processing, you use the before-image dump & simply begin processing again from just before the last...
8
by: TJ | last post by:
I need to be able to pass a pointer to a (managed code) Stream object to a COM method so it can serialize its data into the stream. I have a C# application that makes uses of Randolf Duke's...
4
by: 6tc1 | last post by:
Hi all, I have just finished debugging a windows application and have solved the problem - however, I want to be sure that I understand the problem before I move on. Before I detail the problem,...
5
by: Jigar Mehta | last post by:
Hye Friends!!, Happy New Year!! I am Jigar Mehta from India. Currently I am working on a project in which I need to compress some images on the harddisk... I want to make an engine that reads...
0
by: Andreas Viklund via DotNetMonster.com | last post by:
Hi! I am a student at the University of Umea, Sweden and I am working on my final project. I am developing an application in ASP.NET that takes an image, that have been created with a digital...
10
by: stonny | last post by:
Hi, I am converting my matlab program into C/C++. I need to change some image processing toolbox functions into C/C++, such as edge detection, mathematical morphology. Is there any place that I...
10
by: Enrique Cruiz | last post by:
Hello all, I am currently implementing a fairly simple algorithm. It scans a grayscale image, and computes a pixel's new value as a function of its original value. Two passes are made, first...
3
by: birensubudhi | last post by:
hey guys,can anyone tell me what is image processing, how to do it using C. IN KSHITIJ 2007 held at IIT kgp a que by INFOSYS is asked, they hav given an image then cut in different orientation...
5
by: whisk3rs | last post by:
Hello, I have a conceptual question. I need to write a program that will take as input a list of images and then process each image individually (extract useful features from the image) ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.