|
AutoImageInfo component
This component can get the size of an image ,
type of image , file size and the time / date the image was
last modified . this component is freeware and is available
at http://www.unitedbinary.com/AutoImageInfo.phpx
Code :
<%
Dim ImageInfo
'create an instance of the object
Set ImageInfo = Server.CreateObject("UnitedBinary.AutoImageInfo")
'this is the path to the image used in this example , change
to your own
'image
ImageInfo.ReadHeader "D:\asp\thumbnail.jpg"
'display various snippets of information
Response.Write "Information about our image<br>"
Response.Write "File format : " & ImageInfo.ImageFileFormat
& "<br>"
Response.Write "File SIze : " & ImageInfo.FileSize
& "<br>"
Response.Write "Width : " & ImageInfo.ImageWidth
& "<br>"
Response.Write "Height : " & ImageInfo.ImageHeight
& "<br>"
Response.Write "Last modified : " & ImageInfo.FileDateTime
& "<br>"
'destroy the object
Set ImageInfo = Nothing
%>
Sample :

|