Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Image size

Reply
Thread Tools

Image size

 
 
Eugene Anthony
Guest
Posts: n/a
 
      06-09-2006
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 ***
 
Reply With Quote
 
 
 
 
Mike Brind
Guest
Posts: n/a
 
      06-09-2006

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

 
Reply With Quote
 
 
 
 
Eugene Anthony
Guest
Posts: n/a
 
      06-10-2006
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 ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preferred Size, Minimum Size, Size Jason Cavett Java 5 05-25-2008 08:32 AM
mega pixels, file size, image size, and print size - Adobe Evangelists Frank ess Digital Photography 0 11-14-2006 05:08 PM
Image size problem. Image Compression =?Utf-8?B?UGFyYWtp?= ASP .Net 1 06-24-2005 11:55 AM
How to Shrink image size when browser size is reduced Bob Richardson Javascript 3 03-08-2005 06:37 AM
Bigger image size and lower quality vs. Smaller image size and higher quality Desmond Digital Photography 5 09-27-2003 04:08 AM



Advertisments