Maybe this
http://www.vbwm.com/art_19
Main Topics
Browse All TopicsHi,
I am trying to build an ActiveX Dll for use from ASP, to resize a specified image to the required size. The image resize must be to scale and the program must support JPG, GIF and BMP.
I have some code (in VB6) which I have started with (not sure if this will only work for bitmaps - if at all).
=============Code in VB6 (the dll file) ====================
Public Sub ResizeImage(sImgPath, sNewPath, iWidth, iHeight)
Form1.Image1.Picture = LoadPicture(sImgPath)
Set Picture1.Picture = Image1.Picture
Form1.Picture1.AutoRedraw = 1
Form1.Picture1.PaintPictur
SavePicture Form1.Picture1.Picture, sNewPath
End Sub
I then call this from the ASP page:
========ASP Code (in the resizeimage.asp file)==========
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim objResize
Set objResize = Server.CreateObject("MyRes
MyResize.ResizeImage "C:\Site\htDocs\Futurama.b
Set MyResize=Nothing
%>
NB: This is example code and intentionally uses literals.
The ASP page returns "Object Required" on line 6 (MyResize.ResizeImage) - but does seem to execute past the Form1.Image1.Picture = LoadPicture(sImgPath) line because if you pass an invalid filename to MyResize.ResizeImage then the ASP error returns "File not found".
P.S
The DLL file is correctly registered and I cannot see any permissions problems (either to the DLL file or the Image Files).
Please advise if this method is innappropriate for my requirements.
Thank you for your time,
James.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Maybe this
http://www.vbwm.com/art_19
Is the picture saved to the file? I assume Set MyResize = Nothing is a typo as well?
What I meant be debugging was, go to Project -> Properties in your DLL project, select the Debugging tab, ensure "wait for components to be created" option is selected. Press F5 to put your project in "run" mode with a breakpoint set on the first line in your ResizeImage sub routine. Then open your ASP page that calls this dll and it should jump into your DLL project allowing you to step through the code.
Business Accounts
Answer for Membership
by: rajaamirapuPosted on 2003-11-21 at 04:38:33ID: 9796424
Hope this helps f visualbasi cexplorerf rm47.showM essage?top icID=8.top ic
http://pub13.ezboard.com/