Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 20th, 2007, 01:56 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hcweb
Default Response.BinaryWrite

Hello all,

I am querying an image file from a SQL database and using Response.BinaryWrite to write the image to a browser. The image is stored at 640X480 and I would like to be able to resize this image to display something a little smaller in the browser. Is there a way that this can be done and how?

My current code:

strIMG = "2400" & Replace(Request.Querystring("image"), "'", "''")

Set objComm = Server.CreateObject("ADODB.Command")
objComm.ActiveConnection = strConnect
objComm.CommandText = "SELECT image FROM v_image WHERE image_id = '" & strIMG & "'"
objComm.CommandType = adCmdText
Set objRS = objComm.Execute
Set objComm = Nothing

If objRS.EOF Then
    Response.Write "Nothing Found " & strIMG
Else
    Response.BinaryWrite objRS("image")
End If
objRS.Close
Set objRS = Nothing

This displays fine with the exception of not being able to alter the image size.

Thanks in advance.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Response.BinaryWrite issue alliancejhall ASP.NET 2.0 Basics 1 November 14th, 2007 11:29 PM
response of AT Commands bobwith5 .NET Framework 2.0 0 October 31st, 2007 08:54 AM
i need a response to my q..:-) noor ASP.NET 1.0 and 1.1 Basics 1 January 14th, 2005 05:10 PM
BinaryWrite an image Bammer22 C# 2 March 3rd, 2004 02:14 AM
Response.Flush jeffm_22 Classic ASP Professional 1 October 20th, 2003 08:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.