Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default ASPImage on the fly

    I want to use ASPImage to resize photos and show them to user as thumbnails
    on the fly (I do not want to save them). Any idea how to achieve this?

    On their page, they advise me to use Response.BinaryWrite, so this is what I
    did:

    Response.ContentType = "Image/Jpeg"
    Response.BinaryWrite Image.FileName

    Instead of showing the image, it shows the binary contents!! Any help is
    appreciated.

    Mohamed Hosam



    Mohamed Hosam Guest

  2. Similar Questions and Discussions

    1. register asphttp.dll and aspimage.dll ????
      Greetings, We face the same problem. We have purchased (inventory, brand and custumers) a bankrupt ISP. On their servers they have a registered...
    2. ASPIMAGE and VISTA
      Hi All, I am trying to make the ASPIMAGE component Work on IIS and Windows VISTA Seems there is some compatibility issue, ASPIMAGE Seems...
    3. ASPImage Text in an Arch
      Hi, I need to write text dynamically in an ARCH using ASPImage. THe text will come from an input field on a form, so I don't necessarily know in...
    4. ASPImage Tutorial (s)
      Has anyone seen a decent tutorial or can someone post the best way to use ASPImage ? What I need to do is allow a user to resize an image on the...
    5. installing ASPImage
      Hi guys, this is not really an ASP question, but some of you might have had experience with this and I thought you migth be able to help me. I...
  3. #2

    Default Re: ASPImage on the fly

    Very good - I'm glad it worked!

    Chris.

    "Mohamed Hosam" <info@internetplus.biz> wrote in message
    news:u9060YhRDHA.704@tk2msftngp13.phx.gbl...
    > Thanks Chris. My problem was that I want to create a thumbnails gallery
    > indeed. And using your technique, I achieved it! :)) Check:
    > [url]http://www.sghgsite.com/def.asp?P=Multimedia&Br=Jeddah&Lang=en[/url]
    >
    > Thanks again.
    >
    > Mohamed
    >
    > "Chris Barber" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
    > news:#QA63egRDHA.1624@tk2msftngp13.phx.gbl...
    > > The response.binarywrite is for an ASP that will be used as the
    > > src="mypage.asp" of an IMG tag:
    > >
    > > <IMG src="mypage.asp?imagename=photo1">
    > >
    > > The ASP page would load the image, resize it and stream it out as the
    > binary
    > > for the image.
    > >
    > > What you can't do is use an ASP page as the thumbnails gallery and
    process
    > > the image resizing inline (unless you save the images to a specific
    > location
    > > and generate the src="mysavedimage.jpg" in your IMG tags in the html
    > > generated by the page.
    > >
    > > Chris.
    > >
    > > "Mohamed Hosam" <info@internetplus.biz> wrote in message
    > > news:uAGr97TRDHA.2232@TK2MSFTNGP11.phx.gbl...
    > > > I want to use ASPImage to resize photos and show them to user as
    > > thumbnails
    > > > on the fly (I do not want to save them). Any idea how to achieve this?
    > > >
    > > > On their page, they advise me to use Response.BinaryWrite, so this is
    > what
    > > I
    > > > did:
    > > >
    > > > Response.ContentType = "Image/Jpeg"
    > > > Response.BinaryWrite Image.FileName
    > > >
    > > > Instead of showing the image, it shows the binary contents!! Any help
    is
    > > > appreciated.
    > > >
    > > > Mohamed Hosam
    > > >
    > > >
    > >
    > >
    >
    >

    Chris Barber Guest

  4. #3

    Default Re: ASPImage on the fly

    Only drawback with the dynamic resize is scaleability - repeatedly resizing
    the same images over and over again for every page load. However, you should
    find that the images get cached in the local browser which should cut out
    some of the repeated resizing.
    It may be a more scaleable solution to do the resizing when an image is
    uploaded and maintain two directoruies (one for full size and one for
    thumbnails).
    Still, not taking any credit away from what you've done - it obviously works
    and it's probably tought you a little bit about some of the more interesting
    aspects of using ASP pages as 'information generators' (eg. you can do the
    same with an ASP page that generates XML on the fly).

    Chris.

    "Mohamed Hosam" <info@internetplus.biz> wrote in message
    news:u9060YhRDHA.704@tk2msftngp13.phx.gbl...
    > Thanks Chris. My problem was that I want to create a thumbnails gallery
    > indeed. And using your technique, I achieved it! :)) Check:
    > [url]http://www.sghgsite.com/def.asp?P=Multimedia&Br=Jeddah&Lang=en[/url]
    >
    > Thanks again.
    >
    > Mohamed
    >
    > "Chris Barber" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
    > news:#QA63egRDHA.1624@tk2msftngp13.phx.gbl...
    > > The response.binarywrite is for an ASP that will be used as the
    > > src="mypage.asp" of an IMG tag:
    > >
    > > <IMG src="mypage.asp?imagename=photo1">
    > >
    > > The ASP page would load the image, resize it and stream it out as the
    > binary
    > > for the image.
    > >
    > > What you can't do is use an ASP page as the thumbnails gallery and
    process
    > > the image resizing inline (unless you save the images to a specific
    > location
    > > and generate the src="mysavedimage.jpg" in your IMG tags in the html
    > > generated by the page.
    > >
    > > Chris.
    > >
    > > "Mohamed Hosam" <info@internetplus.biz> wrote in message
    > > news:uAGr97TRDHA.2232@TK2MSFTNGP11.phx.gbl...
    > > > I want to use ASPImage to resize photos and show them to user as
    > > thumbnails
    > > > on the fly (I do not want to save them). Any idea how to achieve this?
    > > >
    > > > On their page, they advise me to use Response.BinaryWrite, so this is
    > what
    > > I
    > > > did:
    > > >
    > > > Response.ContentType = "Image/Jpeg"
    > > > Response.BinaryWrite Image.FileName
    > > >
    > > > Instead of showing the image, it shows the binary contents!! Any help
    is
    > > > appreciated.
    > > >
    > > > Mohamed Hosam
    > > >
    > > >
    > >
    > >
    >
    >

    Chris Barber Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139