|
BmpInfo component example
This component displays information about an image
such as size , height , width , description and color depth
. You can grab a copy of this component at http://www.internext.co.za/stefan/bitmapsize/
. This component is donationware so please help the author out.
Code :
<%
Dim BmpInfo
'create instance of component
Set BmpInfo = Server.CreateObject("BitmapLibrary.NewIdentifier")
'this is our image , change this for your own purposes
BmpInfo.SetImage ("D:\asp\thumbnail.jpg")
'display various pieces of information about the image
Response.Write "The image height is " & BmpInfo.ImageHeight
& " pixels.<BR>"
Response.Write "The image width is " & BmpInfo.ImageWidth
& " pixels.<BR>"
Response.Write "The image contains " & BmpInfo.ImageColorDepth
& " colours.<BR>"
Response.Write "The image Byte size is " & BmpInfo.ByteSize
& " bytes.<BR>"
Response.Write "The image size description is " &
BmpInfo.SizeDescription & "<BR>"
'destroy the object
Set BmpInfo = Nothing
%>
Example:

|