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:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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);"?
Asp Get Image Size
i have a page that displays an image. the image path is a variable passed in the url link. eg. enlarge.asp?picture=http://www.hey/.com/you.jpg and the window it opens works. but id like to try and get the enlarge as to get the height and width dimentions so i can call a new window to opena popup and ill dynamically have the images dimentions to scale the popup to fit. and right after the javascript calls a new popup window itll use a close window function. and since it happens before the head tags it should be seamless as if i had a regular link calling a popup.
Size Of Image
I have a table full of pictures with urls to images. Any idea how I could find out the dimensions of the images? i want to design tables to show them in a better way.
Size Image Upon Upload
is it possible to have an asp script create a thumbnail of an image upon upload? i want to create a rather small thumbnail and 65 x 83 and put it in a folder '/sized' oh yeah, and one more quick thing.. i am pulling information from a database.. why is it that the symbol ' gets changed to a ? when pulling it from the field.. will this go away when i start adding information through forms instead of access?
Displaying Image At A % Of It's Size
The pic in the DB is just a named reference, as all the pics are stored in 2 common folders. 1 for the normal size pics and 1 for the thumbnail equivalents. As this particular page has to be tight on space, I wanted to set the image as a percentage of it's size so I set the following: <IMG SRC="thumbs/<%=picname%>' WIDTH="30%" HEIGHT=30%> etc.... Problem I have with this is that the browser seems to set all pics to 1 common percentage size rather than each being say 30% of each individual pic's size. This results in some piccies being completely distorted. I don't want to go down the route of storing the x and y of each pic in the DB, so could you please let me know if I am doing something really stupid with the above.
Image Type And Size
My ASP app dynamically retrieves from db and sends JPG images using Response.BinaryWrite(). And it seems work. The script sets image type as "Response.ContentType = 'image/JPEG';" But viewing image properties in IE returns Type and Size as 'Not available'. How to set these properties properly?
Reduce Image Size
Is there any routine I can call to reduce the size of an image file after uploading a file from a client. I am looking to reduce file sizes programmatically using C# in my web page after uploading. I know that Photoshop can do it but I need to do it dynamically in my web page. I tried doing it myself with some of the Bitmap thumbnail instructions but the resulting image is very bad. I need a file reduction routine that creates a good image that is smaller. I figured if Photoshop can do it then so can I but how?
Detect Image Size Automatically In Asp?
I am writing a little script for an online album. The pictures' size varies a lot. I have a maxim size for every displayed picture because the layout of the page. So I want to resize the larger one to that size while leave the smaller one in their original size. Is there any script or code that can do this automatically?
Check Image Size (width)
How can I use ASP to check the size of the images used in my solution? This is what I need to do: If the width of an image is more than 256px, I want to set the image width to 256px. Images that is smaller (ex: 100px width) shall not be adjusted.
Check Image Size Before Upload
I have a couple of images that the user can upload, but I want to limit the size to 512kb(most of them will come from a digital cam). Is there a way to check the file size before the page submits? ie a javascript function that i can call before submitting the page?
Auto Detection Of Image Size
I have an photo gallery, I want to create a button that opens a new window fixing the full size image snugley in it, which is easy. But I want to get a script which detects the image size so i can use the variables to open the window. What i want to not do is have to more options in the database with height and width in, and have to call them, although i'll do that if i have to, but i thought i would try something new.
Image Size 13kb Only Uploaded
Can u tell me how to control image size , its height and width and total size of image like that 13 kb. while uploading the file in asp?
Upload Image Maximum Size
I want to specify the maximum length of an image the file can upload.If the image exceeds that limit it should show me an error.E.g.; 640x480 pixels.
File Size And Folder Size
I'm using Windows 2000 server n IIS I'm Using FileSystemObject of ASP in Server Every File and Folder has 2 Size when we get properties of any 1 actual size and Size on Disk.now my problem is when i get the file size from ASP object it give Size value but when i try to get folder size it gives size on disk and both values are different. I'm creating a size to access limited size to upload files so i just check the folder size and then get size for those which are going to update by user then i will less those size to actual folder size to get remaining size.
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>
How To Get Size
how can I get size a file from any sites. http://www.domain.com/fileblablabla.zip I want to know what the size of file is by using ASP.. is there any way ? or is there any free component ? (But it must cancel immediatily after getting the size of file.. because maybe its size can be 50 Mb
Url Size Limitations??
I am using variable passing through the url, and as it is getting larger, I am finding that occassionally some values are getting trimmed. Is there a limit to how long a url can be?
FONT SIZE
how can I get different font size in the form method "select", "input" instructions working under ASP? because when I check with the browser is too big in the table. ============================================ <FORM method="post" action="../gallery/default.asp"> Select a category: <SELECT name=""CategoryID"> <option" value="">Select Your Gallery</option> <OPTION value="3">Digital Package</OPTION> <OPTION value="6">others</OPTION> <OPTION value="5">test</OPTION> <OPTION value="4">Traditional Package</OPTION> </SELECT> <INPUT type="Submit" value="View Photos"> </FORM> ==========================================
Listbox Size
I have a drop-down with 40 option values and only one option should be selected of the 40 options. The list size should be 1. When I click on the list, it drops down 30 options (a very long list) with a scrollbar for the last 10 options. Is there any way, when I click on the list it drops down only 5 options (as if the list is of size 5) and allow a scrollbar to browse the remaining 35 options. Code is: <select name="deplist" id="deplist" <option value="Commerce">Commerce</option> <option value="Instru">Instrumentation</option> ... similar such 38 options </select>
Setting Img Size
I need to set the image size in the following line. When I try to set the img to 75x75 I am getting an error. The line I'm having problems with is : Response.Write "<a href='" & imageFilePath & strPicArray(0,x) & "'><img src='" & thumbFilePath & strPicArray(0,x) & "'width="75" height="75"></a>"
Limiting Size
How does one limit the amount of characters being entered into a <textarea>. I know we I can maxlength="50" an <input>, but what about a textarea?
Maximum Size
I need a general code for limiting an image size in pixels.Uploaded Images from people may not be larger on width than 400 px. If so than a script would minimize them to 400 but if they are 260 px then they of course appear in 260 px
How Do I Get A File Size
How do I find out the size of a file. I can get listing of files in a directory but I cannot figure out how to get the file size also. Here is what I have so far. <% Set MyDirectory=Server.CreateObject("Scripting.FileSystemObject") Set MyFiles=MyDirectory.GetFolder(Server.MapPath("test")) For each filefound in MyFiles.files Response.Write filefound.Name & "<br>" Next %> I don't have any books for reference here. Can someone point out a good online source?
Table Size
I have these two tables in a SQL database. i.e. tbl_A and tbl_B I need to create an ASP page that will tell me the size of each table and then the combined size of both tables.How do I accomplish this?
ASP File Size
Is there any limit of file size or lines of code in asp.
Size Array
I have a variable named numdata that contains an integer value. Now I want to create an array with the size of numdata. Example: If numdata is 25, then the array should be test(25). Unfortunatly test(numdata) doesn't work.
Get File Size!
i am using the file type input and an asp upload component to save the file from client machine to server machine. if user type the file name or path that doesn't exists, the upload component still create a file on the destination but that file is empty. Now, how can i determine the size of the file saved on destination. OR its alternative is that can we restrict the user to type the path and file name. i mean the text field is disable and only browse button is used to select a file.
Adding Size
I have just finished building my first shopping cart in asp and MS Access. Originally the shopping cart was to be built for products with no size and colour, however as usual the goal posts have moved and I now need to incorporate a size and colour option for each product. Could anyone explain to me how I can go about doing this i.e. adding the different sizes and colours in the admin website and then linking them to a specific product when it is displayed on the products page? I know they both need to be in a dynamic drop down box when displayed on the products page within the shopping cart, but I am just wondering how to read the correct values out from the table depending on which product is being displayed. I have a normal products table at the moment with general fields i.e ID, name, description etc.
Font Size In ASP
i have created a login page which works great except it looks really ugly in IE. I am trying to make the text size smaller but i have tried everything and it doesnt work. below is my code:
Size Of Recordset
I am trying to create an array the size of my recordset. I tried the following: dim myArray(get_notes.recordcount) I then figured that it was that I needed to initialize this after I got the records. This did not work either, I keep getting the following error: expected integer constant Any Ideas on how to create this array to the correct size that is dependant on the the size of the recordset?
Size Of A File
given a filename on the server, how would you use the filesystem object to determine its size?
Pop Up Form Size
I have an asp app that uses several pop up forms. They are supposed to be larger forms, but on some machines, all using IE, they display a lot smaller than they should be. Here are some of the behaviors that I am experiencing: * It doesn't seem to matter what resolution the client is set for. * It seems to come and go. * It's not consistent across operating systems or browser versions; all client machines use IE 5.5 to 6.0. Where can I set the size for popups so that I can be sure they will display at their proper size?
File Size
How can I get the size of a file using Scripting.Filesystemobject. If not,is there a way that I can using ASP?
Specify Size Of New Window
I have a link which on clicking will go to a new page as in my example below. however i want to open it up in a new window and also specify the size of that new window. how can i do this in ASP? i dont wnat to use Javascript cause I have an ASP variable, strURL, and need to send that to the page. Code: <a href="<A href="somepage.asp?link=<%=strURL%>">email this page</a>
Picture Size With ASP
I wanna do an ASP page , which will find out the Image size of a link. lets say someone gives a link to an Image. just for example, I want to get the Image Size (Height and Width) How to do that?
Checking Page Size
Is there some code to check the page size of some webpages i am opening using asp or javascript? I want to check that they are all over a certain amount (ie: they display something, and not just a blank page. )Also some code to make sure that the page is still valid (ie: It does not display "Page cannot be found")
|