Image size

E

Eugene Anthony

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
 
M

Mike Brind

Eugene said:
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?
 
E

Eugene Anthony

You have not wasted your time. Now the folder problem works fine. This
question is different. Its related to image size.

Eugene Anthony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top