Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASPImage: bizzare concat issue

Reply
Thread Tools

ASPImage: bizzare concat issue

 
 
Kelly
Guest
Posts: n/a
 
      02-08-2006
Help,

So I'm doing the common make thumbnails script. to save server space, I
don't want to store the thumbnails, so I did the classic break up script.

I parse on the main page where it gathers the folders, files and their
paths, then I pass them over into the sendbinary.asp page which does all the
editing.

First of all this works.

basically the final output creates this:

<IMG
SRC="scripts/sendBinary.asp?path=c%3A%5Csite%5Cafolder%5CDC%5Cb oat%5CIM001693%2EJPG">

but, as you can tell, I'm passing over the full information and it writes
the hard drive information where everyone can see it. I went into trying to
pass two variables to the sendbinary page. I tried storing the path as a
session variable and then just passing the image name. That didn't work
(example below).

Is there a way to combine path information... and or hide it from users? I
even tried to get it to do a mappath while in the sendbinary page and that
didn't work. It seems like something like this would work, but it doesn't.

Could anyone offer some advice? A different plan of attack?

Here are some variations I've tried...

1st the output string:



<IMG SRC="scripts/sendBinary.asp?imgname=IM001693%2EJPG">



also, I created a session variable to track the physical path location:



<%
Session("PhysicalPath") = "c%3A%5Csite%5Cafolder%5CDC%5Cboat%5C"
%>



here's how I've altered the code to try to break it into chunks inside the
sendbinary.asp



<%
Response.ContentType = "image/jpeg"
Set Image = Server.CreateObject("AspImage.Image")

path = Request.QueryString("path")
imgname = Request.QueryString("imgname")
Upath = Session("PhysicalPath")
AllPath = Session("PhysicalPath") & Request.QueryString("imgname")

'Image.LoadImage(path)
'the above works if I remove the quote

Image.LoadImage(AllPath)
'I get red x boxes because it can't find the image.
Image.JPEGQuality = 20

' Set new height and width
Dim intXSize, intYSize, intWSize,intHSize

intWSize = 337
intHSize = 62

'scale image so width of whole image is the same as width of
thumbnail

intXSize = intWSize
intYSize = Image.MaxY * intXSize / Image.MaxX

'resize the image
Image.ResizeR intXSize, intYSize

'crop the image x, y, width, height
Image.cropimage 0,((intYSize+intHSize)/2),intWSize,intHSize

Response.BinaryWrite Image.Image
Set Image = nothing
%>




What am I doing wrong?

Thanks very much,

Kelly


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bizzare ViewState issue (ASP.NET) dmartu Software 0 12-04-2008 10:26 AM
Bizzare split tunnel issue on Pix.. Brian V Cisco 4 01-01-2006 07:59 PM
Bizzare Reporting Services error Josef.Szeliga@nrm.qld.gov.au ASP .Net 0 08-30-2005 06:39 AM
Bizzare: Invalid path to Access mdb, path is good Keith-Earl ASP .Net 1 05-03-2004 03:25 PM
Bizzare session variable issue bill joyce ASP .Net 3 10-20-2003 10:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57