Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: RE: Image resize in ASP


Message #1 by Sam Clohesy <sam@e...> on Fri, 28 Sep 2001 12:37:50 +0100



Hi,



I am using the example from the 4guys website about proportional image

resizing, looks great and I have go it to work in various different ways but

not the way I want (As is often the case)



Has anyone else used this code and if so what am I doing wrong?



Here is my code:

Set fs = Server.CreateObject("Scripting.FileSystemObject")



		if 	fs.FileExists(strUserPicPath & "\" &

objRsPic("userId") & ".gif") then

			response.write "<img src = '../_private/userPics/" &

objRsPic("userID") & ".gif'>"

		else

		response.write "<img src='../_private/userPics/" &

objRsPic("userID") & ".jpg'" & ImageResize(strImageName, 100, 75) & ">"

'This calls the resize function



I don't get an error message nothing happens but my image won't resize..



Any help much appreciated



Thanks



Sam

Message #2 by "Ruth Nisenbaum" <ruthnis@0...> on Sat, 29 Sep 2001 06:23:26 +0200
Hi:



From your code, you never get to the resize function because you ask if the

file exists and then you just show it without resizing.

> Subject: RE: Image resize in ASP

> From: Sam Clohesy <sam@e...>

> Date: Fri, 28 Sep 2001 12:37:50 +0100

> X-Message-Number: 7

>

>

>

> Hi,

>

> I am using the example from the 4guys website about proportional image

> resizing, looks great and I have go it to work in various different ways

but

> not the way I want (As is often the case)

>

> Has anyone else used this code and if so what am I doing wrong?

>

> Here is my code:

> Set fs = Server.CreateObject("Scripting.FileSystemObject")

>

> if fs.FileExists(strUserPicPath & "\" &

> objRsPic("userId") & ".gif") then

> response.write "<img src = '../_private/userPics/" &

> objRsPic("userID") & ".gif'>"

> else

> response.write "<img src='../_private/userPics/" &

> objRsPic("userID") & ".jpg'" & ImageResize(strImageName, 100, 75) & ">"

> 'This calls the resize function

>

> I don't get an error message nothing happens but my image won't resize..

>

> Any help much appreciated

>

> Thanks

>

> Sam

>






  Return to Index