home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / asp / IMAGES.ZIP / IMGSIZE.ASP next >
Encoding:
Text File  |  1998-12-23  |  1.1 KB  |  44 lines

  1. <html>
  2. <head>
  3. <title>Image Size Demo</title>
  4. </head>
  5. <body>
  6. <blockquote>
  7. <blockquote>
  8. <p>
  9. <br>
  10. <br>
  11. </p>
  12. <%
  13.   Dim Img
  14.  
  15.   sub CheckFile (strFileName)
  16.     set Img = Server.CreateObject ("ImgSize.Check")
  17.     Img.FileName = strFileName
  18.     if Img.Error <> "" then
  19.       Response.Write "An error occurred in processing this image.<br>"
  20.       Response.Write "The error was: <b>" & Img.Error & "</b>"
  21.     else
  22.       Response.Write "<p>Image <b>" & strFileName & "</b> successfully read.<br>"
  23.       Response.Write "Image Height = <b>" & Img.Height & "</b><br>"
  24.       Response.Write "Image Width  = <b>" & Img.Width & "</b></p>"
  25.     end if
  26.  
  27.     set Img = nothing
  28.   end sub
  29.  
  30.   CheckFile ("d:\inetpub\wwwroot\images\569.jpg")
  31.   CheckFile ("d:\inetpub\wwwroot\images\cloudy.jpg")
  32.   CheckFile ("d:\inetpub\wwwroot\images\chart1.bmp")
  33.   CheckFile ("d:\inetpub\wwwroot\images\aspdevlogo.gif")
  34.   CheckFile ("d:\inetpub\wwwroot\images\write.gif")
  35.   CheckFile ("d:\inetpub\wwwroot\images\smpchrt1.png")
  36.   CheckFile ("d:\inetpub\wwwroot\images\toast.png")
  37.  
  38.  
  39. %>
  40.  
  41. </blockquote>
  42. </blockquote>
  43. </body>
  44. </html>