Image size

Discussion in 'ASP General' started by Eugene Anthony, Jun 9, 2006.

  1. 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 ***
    Eugene Anthony, Jun 9, 2006
    #1
    1. Advertising

  2. Eugene Anthony

    Mike Brind Guest

    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
    Mike Brind, Jun 9, 2006
    #2
    1. Advertising

  3. 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 ***
    Eugene Anthony, Jun 10, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGFyYWtp?=

    Image size problem. Image Compression

    =?Utf-8?B?UGFyYWtp?=, Jun 24, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    483
    Kevin Spencer
    Jun 24, 2005
  2. Laszlo Zsolt Nagy
    Replies:
    1
    Views:
    1,248
    Kartic
    Jan 26, 2005
  3. Jason Cavett

    Preferred Size, Minimum Size, Size

    Jason Cavett, May 23, 2008, in forum: Java
    Replies:
    5
    Views:
    12,518
    Michael Jung
    May 25, 2008
  4. Bob Richardson
    Replies:
    3
    Views:
    219
    Bob Richardson
    Mar 8, 2005
  5. bluedolphin
    Replies:
    1
    Views:
    146
Loading...

Share This Page