Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    PimP City USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto resizing image from DB.

    Hi,

    How do I auto resize an image im taking from the database? Lets say my image is 500x200 and I want to make a perfect resize which comes out to 200x80.

    How can this be done?

    Thank You!
    This is my world, you enter my world, you will step out a loser, I guarantee it.

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    London, UK
    Posts
    411
    Thanks
    0
    Thanked 1 Time in 1 Post
    You use a commercial COM+ component (like ASPJPEG) to resize the image.

    Marcus Tucker / www / blog
    Web Analyst Programmer / Voted SPF "ASP Guru"

  • #3
    New Coder
    Join Date
    Dec 2003
    Location
    PimP City USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Awesome! Thanks, too bad it costs $150 bucks...

    Is there maybe a free one, or cheaper? I bet not tho, you probably would have posted it.

    Thanks Anyway, I will definitly consider it.
    This is my world, you enter my world, you will step out a loser, I guarantee it.

  • #4
    Regular Coder
    Join Date
    Oct 2003
    Location
    London, UK
    Posts
    411
    Thanks
    0
    Thanked 1 Time in 1 Post
    A decent web host should provide an image manipulation component as part of your hosting package - check to see if there is one you can use, and if not, why not!
    Marcus Tucker / www / blog
    Web Analyst Programmer / Voted SPF "ASP Guru"

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can use .NET instead of ASP which has what you want built into it. If you've got .NET installed already you've got the software you need, if you haven't installed it yet, the price is right since it's a free download from MS.

    Use the System.Drawing.Image namespace to load the image, resize it and then use System.IO.MemoryStream to convert it to a Base64 string which you can then write out to the browser with the appropriate headers.

    That's the simplified basics, you can perform a Google search using those keywords above and find several examples which are easy to use and lots of tutorial help on exactly what is going on and how it's accomplished.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #6
    Regular Coder
    Join Date
    Sep 2002
    Location
    Bugaha, NE
    Posts
    330
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dang we need to go with .NET.
    This is in spanish when you're not looking.

  • #7
    Regular Coder
    Join Date
    Oct 2003
    Location
    London, UK
    Posts
    411
    Thanks
    0
    Thanked 1 Time in 1 Post
    I didn't mention ASP.Net simply because although it is without a doubt free and probably the best solution (since it allows your web apps to do anything that a native Windows application can, using all the system libraries) it involves learning a whole new platform and/or language, which I thought went beyond the scope of the question a little.
    Marcus Tucker / www / blog
    Web Analyst Programmer / Voted SPF "ASP Guru"

  • #8
    Regular Coder
    Join Date
    Oct 2003
    Location
    London, UK
    Posts
    411
    Thanks
    0
    Thanked 1 Time in 1 Post
    Just had a quick search and found this image component, which should do the job! It's free for non-commercial use, and otherwise it's only $35...

    http://www.silberfish.com/sfir/

    Marcus Tucker / www / blog
    Web Analyst Programmer / Voted SPF "ASP Guru"

  • #9
    New Coder
    Join Date
    Dec 2003
    Location
    PimP City USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Great, thanks for all your help!

    This is my world, you enter my world, you will step out a loser, I guarantee it.


  •  

    Posting Permissions

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