Image
I am looking to store images within my database. I would like to be able to store the paths, within my tables so that I can set a pointer to the externally stored image, that I can pull my image from and place on an asp.net page. How would i go around doing this, is it as simple as taking the file directory and commiting it to my table?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Display An Image From Access, Stored As Location Name Not Actual Image.
I have a client who has had a ASP site with an Access database for several years. It stores information for the used cars on his lot. I have stored text in the database that points to the location of the image for each record. Each record will have a thumb image that is supposed to display in a list of vehicles available then the user can select an item from this list and a new page displays with the information and the regular size image. So far everything has worked fine exept for the display of the images which are stored in a separate directory called veh-photos. All I get are image place holders. I am using Dreamweaver 2004 and and Access 2000 for the database. Following is the code to list vehicles: ....
Open Image In 'Kodak Image Edit Control' With Web Browser
1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page. 2.This '.tif' type image can be shown better with 'Kodak Image Control'. 3.To have this 'Kodak Image Control' on my code page I just add it's ..ocx to tool box and then drag it from 'Toolbox' to the page. 4.Now after dropping this control to the code it's type is getting changed to 'object' instead of type 'ImgEdit'(and I think this is the reason I don't get correct result). 5.On one button's 'Onclick' event I'm calling a javascript function with which I'm setting a 'Path'and'Display' property of a control. 6.And want to show a image at location -- '..MFTDRCMF919685173-62.tif' which get shown in new browser window but could not get shown in that particular control. That means the path is correct, then what is the problem? For better understanding of problem I'm pasting a following code which I've tried up till now...... .................................................. <%@ Language=VBScript %> <% OPTION EXPLICIT %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <SCRIPT LANGUAGE=javascript> <!-- function showpic() { var path; path = document.frmtif.path.value; alert(path); document.frmtif.ImgEdit1.Image =path; document.frmtif.ImgEdit1.Display; window.parent.self.open(path); } //--> </script> </HEAD> <BODY bgColor=#ffe4e1> <form name="frmtif"> The Image <P> <OBJECT id=ImgEdit1 style="WIDTH: 409px; HEIGHT: 218px" type="ImgEdit" align=left border=1 classid=clsid:6D940280-9F11-11CE-83FD-02608C3EC08A name=imgtif></OBJECT> <input type="hidden" name="path" value="..MFTDRCMF919685173-62.tif"> <input type="button" name="show" value="Show" onclick="showpic();"> </P> </form> </BODY> </HTML> ..................................................
Displaying Alternate Image When Image Source Not Found
I am creating a dynamic ASP VBScript page, which gets data from an Access database. In the database, there is a field which holds a URL to an image. I can get the image to display fine, but where there is no file that matches the URL (i.e. a missing image) I want to display an alternative, default image (e.g. one that says "Awaiting Image"). The field is never blank, but the image file may not exist for all records in the database. I think what I am trying to get to is the following: If file exists (using URL from database to get location of image file) thendisplay image using the url from the database as the image source else display default image - hardcoded in program endif I have had a go and come up with the attached but I get an error with my if statement. <% Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") If objFSO.FileExists (server.mappath("<%=(Recordset1.Fields.Item("ImageLocation").Value)%>")) Then <img src="<%=(Recordset1.Fields.Item("ImageLocation").Value)%>"> Else <img src="images/awaitingimage.jpg" width="243" height="239"> End If %> I get "The page cannot be displayed" with the following error: Error Type: Microsoft VBScript compilation (0x800A03EE) Expected ')' /living_space_root/TMP5zdpv2l4js.asp, line 58, column 66 If objFSO.FileExists (server.mappath("<%=(Recordset1.Fields.Item("ImageLocation").Value) -----------------------------------------------------------------^
Displaying Alternate Image When Image Source Not Found
I am creating a dynamic ASP VBScript page, which gets data from an Access database. In the database, there is a field which holds a URL to an image. I can get the image to display fine, but where there is no file that matches the URL (i.e. a missing image) I want to display an alternative, default image (e.g. one that says "Awaiting Image"). The field is never blank, but the image file may not exist for all records in the database. I think what I am trying to get to is the following: If file exists (using URL from database to get location of image file) then display image using the url from the database as the image source else display default image - hardcoded in program endif I have had a go and come up with the attached but I get an error with my if statement...
Image From Image Folder Into Byte Array?
I can convert an image that is retrieved from a FileUpload object into a byte array and insert it into the database.. When the user signs-up i wish tosimply insert into the Picture (DB Type = Image) field to an image i already have saved in my images folder? Anyone know of a way to do this? Tutorials, articles or advise??!
Show Image From SQL Image Field?
Here is my code. I'm using 2 pages. (Page 1) blob.asp <% set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_blob_STRING Recordset1.Source = "SELECT AboutPic FROM Elizabeth.GF_AboutUs" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 3 Recordset1.Open() Recordset1_numRows = 0 %> <% Response.contentType = "image/jpg" 'Recordset1.Fields("AboutPic") <---Tried both methods size = Recordset1.Fields("AboutPic").ActualSize blob = Recordset1.Fields("AboutPic").GetChunk(size) Response.binarywrite(blob) %> (Page 2 Show the Image) <% Dim urlString urlString = "?" & Request.QueryString %> <% Another rs to show other information as text from the same table %> <body> <img src="blob.asp<%=urlString%>" width="194" height="256"> </body>
<%=request.querystring("image")%> Image Won't Display
This worked fine for enlarging my images until i put it onto a secure server, anyone know how i can fix it ??? just comes up with the standard box with a red cross in it .. and the url when i click image properties says: http://url/images/<%=request.querystring( which is only part of the code)
Merge An Image Into Another Image
I'm looking for a simple way to merge an image into another image.What i have is a screenshot uploader, and i want to make it so that when they upload the SS, the script will automatically merge a small copyright type image onto the bottom right of the picture.
Image
I need to resize images to a fixed width. How can I hold the aspect ratio?
Image Not Available
I need to verify if images exist and all I have are the URLs to the images,therefore using the FSO is out of the question. Is there an easy way to check http://www.thisdomain.com/images/03245.jpg and see if it exists.If not,I'd like to show an "image not available" graphic instead.
If Image Is There
how can I check weather a image exsists e.g. if xtra/img/v_.jpg exits img src=xtra/img/v_.jpg else img src=images/awaiting.jpg endif
Image Id
What I need to do is to get the id of an image and set it to a variable that I can use throughout the page. What I'm trying to do is see how many images I have on a page, place there id values into an array and then based on their ID values call the function to change the image. See i have the same image being generated on some rows that are brought into a database. They a named with a number after each ie:image1 image2 and so on but because I have other elements it would take too long to check through them all.
Upload Image
I've been trying for a while now to write a page that uploads an image to a file. Does anyone have a really simple example that I can start with. I have searched the net but only found complicated examples.
Image Properties: How To Get,
I am wondering if it is possible to get more information on files then just name, date, size etc.. Specific, I want to know what dimension (x and y pixels) an images has. Can this be done by ASP. Do I need a component? Are there free components out there?
Insert An Image
I have a website I am working on that I did not create. It is ASP and SQL based. There is a content management system created using ASP and saving in the SQL server database. A user can enter a news article into a big text box/area, and choose to add an image. The text and image are stored in the database via ASP and pulled out to the website via ASP. The image shows up in the website to the top left of the article. I need to make it so the user can enter an image where their cursor is in the paragraph (like a word document) and have it also show up there on the website. Any ideas?
Image Size
I am having a problem with this code. The problem I am facing is that the first image is displayed in its original size. But when I click the next button, the next image not displayed in its original size, but being displayed as 100 x 100 pixels, same goes to the 3rd picture and so on. Code:
Image Question
I have a very simple image basically a box with four colour coded sections - for underweight, healthy weight etc - is it possible to put a line through the image based on where the current users weight falls? or an X or some kind of marker?
Uploading Image
i know that this thread allready exists buti still don't understand what to do ... i'm using microsoft frontpage and access database and would like to upload image file to access ... so ... it looks like that: i have one page - on that page there is an upload form which leads to another ASP page ... on next page i would like to call that form from the previous page and then store it to the database (if it's possible i would like to do it without any software - because i'm not the owner of the server) ... Code:
Image Display From DB URL
I have some error in displaying Image in the fields here is the Code: <tr class="productListing-<%=even%>"> <td class="productListing-data"> <img src=""" & <%=rsProducts("product_image")%> & """ width=""20"" height=""20""/><br /></td> <td class="productListing-data"> <a href="?mod=product&cat_id=<%=cat_id%>&product_id=<%=rsProducts("product_id")%>"><%=rsProducts("product_name")%></a></td> <td class="productListing-data"> <%=rsProducts("manufacturer_name")%></td> <td class="productListing-data"> <%=strCurrency%> <%=RoundNumber(rsProducts("product_price"))%></td> </tr> Where is the error ....
Display Image
I'm trying to display an image which is stored in a database, followed by some other information, but I'm having some issues. It's stored in an access database as an OLE object. The code I've got right now is: <% Response.ContentType = "image/gif" %> <img src="<%= Response.BinaryWrite(rs("ItemImage")) %>"> The error message I get displayed "The image cannot be displayed because it contains errors" I also tried it like this: <% Response.ContentType = "image/gif" %> <img src="<%= rs("ItemImage") %>"> which didn't display any errors, but also didn't display the image. Any ideas where I'm going wrong with this?
Upload Image
I am handling a module using ASP3.0 which has to upload an movie clips of size 1 mb or 2 mb. i have a code which upload only files or images....
Image Retrieval
I am planning to build a basic page that brings up images from a Database based on keywords.
Image Rotation
Been searching for a way to simply have an image change every time a user refreshes the page or whenever the page is loaded. i have 2 pages i want to do this with - adventure articles page and the destinations articles page. i'll just refer to the destinations page and assume that if i (we) can get this to work then i can just copy the method to make it work on the adventure articles page. the site is for a travel and adventure magazine we publish. the site is <http://collegianmag.com>. the page i've been working on isn't linked into the site yet, it is here: <http://collegianmag.com/art_dest.asp> there are 8 gif's (that are are the same dimensions) that i want to use on this destinations page. i've learned that our host only supports ASP and .NET. so i found this info: <http://www.4guysfromrolla.com/webtech/042999-2.shtml> for an ASP Ad Rotator. it was the closest thing i could find - these aren't ads, they're just pictures. and i don't need them to carry links, alt tags or any kind of redirect. but i thought that i may be able to either delete those parts out of the code or just keep them in there and not worry about the fact that mousing over the images makes them look like they're linked. it appeared simple enough, and after i modified the code for my files and folders, it almost worked. i have been checking my asp page in IE to see if it works, and some of the gif's are now showing up, but when you refresh, it's either displaying one of about 3 of the 8, or there also seems to be 1-2 gifs that are getting "red x'd" like they aren't loading up. yes, i've double, triple and quadruple checked to make sure all of the images are in their proper directory. my code looks like: ....
Image On Click
<FORM Action="<%=Request.ServerVariables("SCRIPT_NAME") %>" Method=POST> <Input Type=Hidden name="CurrentPage" Value="<%=CPage%>" > <% If CPage 1 Then %> <Input type=Submit Name="Submit" Value="Previous"> <% End IF%> <% If CPage <TotPage Then %> <Input type=Submit Name="Submit" Value="Next"> <% End If %> </FORM> this function i want to call when i click an image. i mean i have previous and next image in the page. when i click previous image i want to call this function.
Random Image
I have done random image display with the help suggestion from this discussion form. now I want to provide link on each image. i.e. all the images display randomly, should have different link. is it possible? if yes, how?
Image Map To ASP/Access DB
I have a project that has a plat map of a property development which features over 900 homesites. The client wants each homesite linked to a DB with the ability to turn on/off a flashing indicator for the homesites that are available. The nearest thing I've seen to this is on cruise ship booking sites, where available cabins flash. My question is, what's the best way of achieving this? I have thought about image mapping the entire play, then entering the coordinates in the DB, so if anyone has any better ideas I'd be extremely grateful.
Refreshing An Image
I am working on a Classic ASP site. I have some code that displays an image based on the results of a record in a database. What I need is for this image to reload every 20 seconds. If the record in the database has changed, then the image changes. Is there a way to get it to reload without the entire page reloading?? Code:
Do Not Cache Image
In my asp code i generate a graph/plot which is saved as a .png file, so saved as an image to the server. The problem is when i revisit the page with different selections, a new image is generated but not shown in the HTML. The previous image is shown which is not desired. So i did some coding to not cache the image, but without succes. Here is some code i tried: Response.Expires = 0 Response.Expiresabsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","no-cache,must-revalidate" Response.CacheControl = "no-cache" <html> <head> <meta http-equiv="pragma" content="no-cache"> </head> </html> and i used "nosave" in the img tag <td><img src="linegraph.png" width="<%=xsizewindow%>" height="400" usemap="#map1" border="0" nosave></td> but all these options without succes......
How To Display Image
I've been creating a page in asp which displays records from an access database. I have limited the number of records displayed to 5 per page. If there are more than 5 records then the user can click next to view the next 5 and so on. My Image field in the database has a data type of "text" and then i put the path to the image. However when i run my asp page it displays the path as text and im not so sure were im going wrong. Here is a section of the code used to display the recordset. For intRec=1 To rs.PageSize If Not rs.EOF Then Response.Write "<tr>" For Each fldF in rs.Fields Response.Write "<td>" & fldF.Value & "</td>" Next Response.Write "<tr>" rs.MoveNext End If Next Response.Write "</tbody></table><p>"
Displaying An Image
I'm sure I'm missing something completely obvious, but I can't figure out what. I have a path to an image file stored in a database. I'm trying to align the image to the right, but nothing seems to be working: Response.Write("<img src='" & rs("faculty_link_to_photo") &"'>") dispays the photo without any wrapping, but when I try the following, the images go all over the page: Response.Write("<img align=""right"" src='" & rs("faculty_link_to_photo") &"'>") Can someone tell me what I'm doing wrong?
Getting Image Size
I only need to know the height and width of the image. It doesn't seem to be as easy as php's "getimagesize($imgFile);" method. <% 'Copyright *c* MM, Mike Shaffer 'ALL RIGHTS RESERVED WORLDWIDE 'Permission is granted to use this code 'in your projects, as long as this blah 'copyright notice is included function GetBytes(flnm, offset, bytes) Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFTemp = objFSO.GetFile(flnm) lngSize = objFTemp.Size set objFTemp = nothing Set objTextStream = objFSO.OpenTextFile(flnm,1) strBuff = objTextStream.Read(offset - 1) GetBytes = objTextStream.Read(bytes) objTextStream.Close set objTextStream = nothing set objFSO = nothing end function function lngConvert(strTemp) lngConvert = clng(asc(left(strTemp, 1)) + ((asc(right(strTemp, 1)) * 256))) end function function lngConvert2(strTemp) lngConvert2 = clng(asc(right(strTemp, 1)) + ((asc(left(strTemp, 1)) * 256))) end function function gfxSpex(flnm, width, height) fileT=split(flnm,".") if fileT(1)="gif" then Width = lngConvert(GetBytes(flnm, 7, 2)) Height = lngConvert(GetBytes(flnm, 9, 2)) elseif fileT(1)="bmp" then Width = lngConvert(GetBytes(flnm, 19, 2)) Height = lngConvert(GetBytes(flnm, 23, 2)) elseif fileT(1)="png" then Width = lngConvert2(GetBytes(flnm, 19, 2)) Height = lngConvert2(GetBytes(flnm, 23, 2)) end if gfxSpex=true end function if gfxSpex("images/urlogo.gif", w, h) = true then response.write w & " x " & h end if %> Which is a little bit shorter, and seems to work ok so far, but isn't there anything easier, like php's "getimagesize($imgFile);"?
Image Gallery
I have to create an image gallery that reads from a directory on our server and posts the pictures in sequential order based on the title of the image that shows up in the directory. The images can not be stored in a database, just in a directory that employees can access and add new images. The titles will all start with numbers like 1employeename, 2employeename, 3employeename. The images should be listed on the page in order by number. I really don't know how to do this in classic ASP. If it were ASP.net I would at least know where to begin. Does anyone have any suggestions on where I could start, or find information on how to do this?
Image Gallery ... How?
I would like to be able to have an image gallery that i can upload photo's to. It would have to resize the image to say 1024x768 and also make a small thumbnail, then add the neccessary data to a database so that i can easily display it. What is the best way to go about this without spending any money?
Download Image?
I have this javascript photo album i made. It is all working in tables and such. When you roll over a certain cell it will show that picture above, and turn the cell a different color. I also made the cell "clickable" when they are on it. Is there anyway i can get it to when someone clicks that cell, that it will download that picture?? I have looked everywhere but i have not see anythign that will allow me to do that.
Image Thumbnail
I am writing an ASP site that contains images. The owner of the site wants to be able to upload images. The only problem is that the owner is not computer literate enough to be able to create a thumbnail. So basically I am looking for some code that would help me take the image he has and create a thumbnail out of the image.
Random Image
example: When u see some sites , the advetisement images are changing , when ever the browser is refreshed... ..... like tha i want to do that.....
IMG Tag Not Displaying Image
I have ASP (classic) code that writes out a table and sets the <img....> tag with a virtual directory source, e.g. src='/test/imghold/xyz.png', and the images do not appear on the IE page. The code is from a production site that works fine. We just duplicated the web site to one named test and now the images do not display. The IMG item is in a TD element of a table. Also, I looked at the "view source" of the page and it shows the <IMG src='/test/imghold/xyz.png'...> just fine. I even tried it with different images and none of them show up.
Text To Image
Just wondering if anyone knows of any scripts/component that will allow me to create an image of a text on the fly?
Image Resize
What is the best image resizing tool is out there? I want to resize images in ASP page when users upload them into some directory.
Transparent Image Using Css
can you set an image transparent using css rather then make a whole new transparent image? I dont want to do as it meant duplicating images taking up more room on my server.....
Random Image
I have the below ASP function to display a random image from a folder. <% Function RandomImage(strPath) Randomize() If Right(strPath, 1) <> Chr(47) Then strPath = strPath & Chr(47) strPhysical = Server.MapPath(strPath) Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder("C:Inetpubwwwrootpag-siteimages andoms") Set objFiles = objFolder.Files For Each objFile in objFiles strFile = LCase(objFile.Name) strFiles = strFiles & strFile & vbTab Next strImages = Split(strFiles, vbTab) If UBound(strImages) > 1 Then RandomImage = strPath & strImages(Int(Rnd(1)*UBound(strImages))) End If End Function %> and this places the image in the HTML <img name="Intropic" src="<%=RandomImage("images/randoms/")%>" width="211" height="158" alt="" /> but sometimes the script places a ._ before the image file name in the outputted HTML?
Image Name In Database
Currently i have setup a form that takes the users information and drops the info into an access database and displays the info out the way i want it to. After i take the info, i setup a seperate form to take in the users images of there choice that drops into a directory on my server, which works fine as well. What i am looking for though is a way to take the location of the image and drop that into another database or the same one so i can use it as a link when displaying the information.
Image FTP To Database
I have two tables. ALPHA; fields id (a text field, that contains a string) image (a text field, that contains an url path for a file) and BETA id (a text field, that contains a string) image (a field to insert an image) I need to insert in BETA the information of field 'id' and the file that the field 'image' is pointing to. The url path of that file may me inside or outside my domain. For example, if the 'image' field says "pepe.com/image1.jpg", even if the ASP file is not in www.pepe.com domain. Is there a way to do that?
Image Uploader
Does anyone have any code that allows me to upload two images in one submit? I also need the filename to be inserted into the database.
Input Image Box
when I use: <input type=button id=Test> the following code works myform.Test.disabled = true When I change the input box to type image none of the properties are available. I get the message "object doesn't support this property or method" Can anyone tell me how to fix this.
|