NOS OFFRES
 


COMPOSANTS ASP : IMAGE SIZE

Le composant Image Size pour ASP permet de déterminer la taille en pixel de n'importe qu'elle image de type Gif, Jpg, Bmp ou Png

Exemple d'utilisation :

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.
"
Response.Write "The error was: " & Img.Error & ""
else
Response.Write "

Image " & strFileName & " successfully read.
"
Response.Write "Image Height = " & Img.Height & "
"
Response.Write "Image Width = " & Img.Width & "

"
end if
set Img = nothing
end sub
CheckFile (Server.MapPath(".")&"\image.png")


ou encore :

<%
strFileName = "image.gif"
set Img = Server.CreateObject ("ImgSize.Check")
Img.FileName = strFileName
if Img.Error <> "" then
Response.Write "An error occurred in processing this image.
"
Response.Write "The error was: " & Img.Error & ""
else
Response.Write "

Image " & strFileName & " successfully read.
"
Response.Write "Image Height = " & Img.Height & "
"
Response.Write "Image Width = " & Img.Width & "
"
end if
set Img = nothing

%>