ASPImage: bizzare concat issue

Discussion in 'ASP General' started by Kelly, Feb 8, 2006.

  1. Kelly

    Kelly Guest

    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%5Cboat%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
    Kelly, Feb 8, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bill joyce

    Bizzare session variable issue

    bill joyce, Oct 18, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    319
    bill joyce
    Oct 20, 2003
  2. Keith-Earl
    Replies:
    1
    Views:
    1,968
    Peter O'Reilly
    May 3, 2004
  3. =?Utf-8?B?VGltOjouLg==?=

    onClick in aspImage???

    =?Utf-8?B?VGltOjouLg==?=, Jul 19, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    19,684
    Bob Barrows [MVP]
    Jul 19, 2005
  4. Fredo Vincentis

    installing ASPImage

    Fredo Vincentis, Jul 8, 2003, in forum: ASP General
    Replies:
    1
    Views:
    126
    Mohamed Hosam
    Jul 8, 2003
  5. Mohamed Hosam

    ASPImage on the fly

    Mohamed Hosam, Jul 8, 2003, in forum: ASP General
    Replies:
    0
    Views:
    116
    Mohamed Hosam
    Jul 8, 2003
Loading...

Share This Page