VPW Systems (UK) Ltd

Specialist Service Providers
 

Customer Support : Manuals and Reference Guides : ASP Image Size

The ImageSize is simple, and performs the function quite obviously of determining an Images Size. An example of its use is below:

<%
Dim Img
sub CheckFile (strFileName)
set Img = Server.CreateObject ("ImgSize.Check")
Img.FileName = strFileName
if Img.Error <> "" then
Response.Write "An error occurred in processing this image.<br>"
Response.Write "The error was: <b>" & Img.Error & "</b>"
else
Response.Write "<p>Image <b>" & strFileName & "</b> successfully read.<br>"
Response.Write "Image Height = <b>" & Img.Height & "</b><br>"
Response.Write "Image Width = <b>" & Img.Width & "</b></p>"
end if

set Img = nothing
end sub

CheckFile ("d:\inetpub\wwwroot\images\569.jpg")
CheckFile ("d:\inetpub\wwwroot\images\cloudy.jpg")
CheckFile ("d:\inetpub\wwwroot\images\chart1.bmp")
CheckFile ("d:\inetpub\wwwroot\images\aspdevlogo.gif")
CheckFile ("d:\inetpub\wwwroot\images\write.gif")
CheckFile ("d:\inetpub\wwwroot\images\smpchrt1.png")
CheckFile ("d:\inetpub\wwwroot\images\toast.png")
%>

 

Support: ASP Components Reference Home

Support: Home

Support: Frequently Asked Questions