473,378 Members | 1,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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. How do I solve the problem.
<%Option Explicit%>
<!--#INCLUDE FILE="inc_Common.asp" -->
<%
On Error Resume Next

Folder = Request("Folder")
FileNbr = Request("imgNbr")
ImageFilePath = myFolder + "/" + Request("Folder")
counter = 0
lImgCounter = 0

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(Server.MapPath(ImageFilePath))

For Each objFile In objFolder.Files
strFileExtension = LCase(Mid(objFile.Name, InStrRev(objFile.Name, ".",
-1, 1) + 1))

If strFileExtension = "gif" Or strFileExtension = "jpg" Then
If (CLng(counter) = CLng(FileNbr)) then
imgCurrentBaseName = objFSO.GetBaseName(objFile.Name)
lImgCounter = lImgCounter + 1

ShowImageLink = "<img src=""" & myFolder & "/" & Folder & "/" &
objFile.Name & """ vspace=""15"" hspace=""15"" border=""0""" & """>"
CurrentFileName = objFSO.GetBaseName(objFile.Name)
FileNameSpaces = Replace(CurrentFileName,"_"," ")

End If
counter = counter + 1
End If
Next
%>
<html>
<head>
<title>Full Image</title>
</head>

<body bgcolor="#000000">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="*"
align="center">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%"
align="center">
<tr>
<td class="header" align="left" width="10"><img
src="icons/td_top_left.gif" width="8" height="20" border="0"></td>
<td class="header" align="left" width="*"><font
class="PopTitle"><%= FileNameSpaces %></font></td>
<td class="header" align="right" width="80" valign="center">
</td>
<td class="header" align="right" width="10"><img
src="icons/td_top_right.gif" width="8" height="20" border="0"></td>
</tr>
</table>
<table cellpadding="2" cellspacing="0" border="0" width="100%">
<tr>
<td align="center">
<%
Response.Write ShowImageLink
ThumbNextLink = CLng(FileNbr) + 1
ThumbPreviousLink = CLng(FileNbr) - 1
%>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%"
align="center">
<tr>
<td class="middle" align="left" width="10"><img
src="icons/td_bot_left.gif" width="8" height="20" border="0"></td>
<% If (CLng(FileNbr)) > 0 Then %>
<td class="middle" align="left" width="80">
<A href="show.asp?Folder=<%= Folder %>&imgNbr=<%=
ThumbPreviousLink %>" class="links">Previous</A>
</td>
<% End If %>
<td class="middle" align="center" width="*">&nbsp;</td>
<% If (CLng(FileNbr) < (CLng(counter)) - 1) Then %>
<td class="middle" align="right" width="55">
<A href="show.asp?Folder=<%= Folder %>&imgNbr=<%= ThumbNextLink
%>" class="links">Next</A>
</td>
<% End If %>
<td class="middle" align="right" width="10"><img
src="icons/td_bot_right.gif" width="8" height="20" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
Set objFSO = Nothing
Set objFolder = Nothing
%>

Eugene Anthony

*** Sent via Developersdex http://www.developersdex.com ***
Jun 9 '06 #1
2 2077

Eugene Anthony wrote:
I am having a problem with this code.


Is the folder code working properly now? Only I just spent some time
trying to go through your code to reply to the other thread, then found
this one? Was I wasting my time?

--
Mike Brind

Jun 9 '06 #2
You have not wasted your time. Now the folder problem works fine. This
question is different. Its related to image size.

Eugene Anthony

*** Sent via Developersdex http://www.developersdex.com ***
Jun 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ruby Tuesday | last post by:
I have a section(185pixelsx 185pixels) in my web page to display an image that is stored in a directory. Using php, how do you resize so if: the image dimension is smaller(width and height is...
3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
4
by: no-spam | last post by:
Hello, I have an HTML question that I'm not sure can be solved. I want to restrict the maximum size of an inline image. For example, I can force the image to be 200x200 if I do this: <img...
8
by: Chris Dewin | last post by:
Hi. I run a website for my band, and the other guys want an image gallery. I'm thinking it would be nice and easy, if we could just upload a jpg into a dir called "gallery/". When the client...
1
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks-...
6
by: nichughes | last post by:
Hello all, A question relating to http://www.entrust-systems.net/ Just for a change I have run into a problem that seems to be OS specific rather than browser specific - the box image that is...
3
by: =?Utf-8?B?SlIx?= | last post by:
I would like to add text to an image. I have tried to use DrawString and it works on some images but on others it is very very small. I am pretty sure it has something to do with the size of the...
2
by: Adam Teale | last post by:
hey guys Is there a builtin/standard install method in python for retrieving or finding out an image's dimensions? A quick google found me this:...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
2
by: studentofknowledge | last post by:
For some unknown reason ie is placing images I have in a div in a weird way. One image is overlapping another but this problem is not occuring in mozilla. I have looked at my code over and over again...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.