Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image in DB - Dynamic Resize with FileSystemObject?

Status
Not open for further replies.

TWillard

Programmer
Apr 26, 2001
263
US
I am writing a phone directory console which will return contact information and a picture of the person. The contact information and picture are stored in a database. Currently I am querying this information as shown/described below.

I am using an img tag and the src property points to an asp file, whose content type is image/gif with a response.binarywrite of the image data:
<img src=&quot;getimage.asp?PERSONID=<%=personid%>&quot;>

The only problem is that the images are of different sizes and therefore, it makes the Results page look skewed. The images have already been captured and stored in the database. The database also was not setup to store the properties of the imgaes? I have a dynamic resize script which uses a filesystemobject to resize an image using its default ratio to a size that will meet my pages needs.

Is it possible to binarywrite the image data into a filesystem object and then display the image? How would I do this?



 
If you look over the first couple pages of posts you will find a long script that was posted recently that wil actualy ascertain the image size from just the binary file. I understand you already have that portion under control, but I believe the script also will display the picture back out, which should provide you an example oif how it is done for differant image types. I haven't had a chance to look closer at the postin question, so if I am wrong about it outputting back out post back and I will tear out an example for you when I get home.
-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
No more vacation for me :(

FAQ FAQ20-2863
= new Forums.Posting.General.GettingAnswers()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top