Active BitmapSize Overview
 

ActiveBitmapSize II is an ASP component that provides the facility of checking the pixel and bytesize of an image. This is useful when you wish to determine the size and geometry of an online or uploaded image (jpg, gif, png or bmp). The component is a form of freeware that I term donationware. It can be downloaded from the downloads section in either a full setup kit or as the naked DLL itself.

You will notice that the Component's Name is Active BitMapSize 2. Naturally there was also an Active BitMapSize 1 which I needed under IIS 3.0. It worked fine and never gave me any problems. However, I got some pretty nasty emails from other people who claimed it crashed their server, totally destroyed their harddrives and so on. I assume that most of these people were running IIS4.0. To totally confuse me, I got another letter from someone using the component under IIS5.0 who said it worked just great without any problems.

To give the guys who did not have any good experiences with the original component benefit of the doubt, I totally rewrote Active BitMapSize. There is virtually no resemblance in the code of Version 0.5.1 and the newer Version 1.0.1. The newer one should give no problems under IIS4, and is more efficient : especially with BMP, GIF and PNG files. So to everyone who thought this component really sucks, please try the new one.

 
Active BitMapSize Properties & Methods
 
Function SetImage(FileName) As StringSetImage(FileName)This is the main method of the component. It takes a single parameter which is the full path & filename of the imagefile. The method returns a string value which should be interpreted as an Error Message. If it is of zero length, then no errors occurred. If any errors occurred, then it contains the specific Error Message.
Property ByteSize As Long (read-only)ByteSizeOnce the SetImage method has successfuly been executed, the ByteSize property returns the size of the imagefile in bytes. This Property is read-only
Property ImageHeight As Long (read-only)ImageHeightRead-Only Property that returns the height (in pixels) of the image. Can only be used after a call to SetImage.
Property ImageWidth As Long (read-only)ImageWidthRead-Only Property that returns the width (in pixels) of the image. Can only be used after a call to SetImage.
Property ImageColorDepth As Long (read-only)ImageColorDepthRead-Only Property that returns the number of colours contained in the image. Can only be used after a call to SetImage.
Property SizeDescription As StringSizeDescriptionRead-Only Property that returns a quick description of the settings in text. Can only be used after a call to SetImage
 
Sample ASP code for using the component
 
<%
   Dim AXBitmap
   Dim strResult
   Set AXBitmap = Server.CreateObject("BitmapLibrary.NewIdentifier")
   strResult = AXBitmap.SetImage("c:\InetPub\wwwroot\demo\uploads\image.jpg")
   If Len(strResult) <> 0 Then
      Response.Write "Sorry, the image could not be interpreted : " & strResult
      Set AXBitMap = Nothing
      Response.End
   End If
   Response.Write "The image height is " & AXBitmap.ImageHeight  & " pixels.<BR>"
   Response.Write "The image width is " & AXBitmap.ImageWidth  & " pixels.<BR>"
   Response.Write "The image contains " & AXBitmap.ImageColorDepth  & " colours.<BR>"
   Response.Write "The image Byte size is " & AXBitmap.ByteSize  & " bytes.<BR>"
   Response.Write "The image size description is " & AXBitmap.SizeDescription  & "<BR>"

   Set AXBitmap = Nothing
%>
 
Downloads
 
Full Installation Package (Zip file)1,415,209 bytes
Raw DLL. You can download this if you already have Visual Basic V6.0SP5 runtimes and use regsvr32.exe.
If this sounds alien to you, rather download the full package.
32,768 bytes
 
Revision History
 
Sep 11, 2002Released V1.0.5. Component recompiled with unattended execution set.
Dec 3, 2001Released V1.0.4 to fix behaviour of creating zero length files when checking dimensions of a non-existing image. Thank you to doron_g@hotmail.com for reporting this.
March 29, 2001Re-Release of updated Library V1.0.3
March 25, 2000Initial Release V0.5.1
 
Build & Resource Information
 
Primary Build Tool Visual Basic 6.0 SP5
 
Donationware
 

As every programmer knows, a fair amount of time goes into developing a product. Programmers are normally nice guys but are not the sharpest business people. As a result, we tend to give away things for free. DONATIONWARE is my idea of letting you make a contribution if you feel that you would like to. So, if you like the software and feel that it saved you time, you can make a US$10 contribution. Or you can just use it for free and feel bad about it ;). Either way, the software is the same. It still works and it is not crippled. You will not receive a new super version of the component when you register. The free and the registered versions are the same. You do not HAVE to buy it, but if you want to make a contribution, feel free to do so by clicking here or by clicking on the button below. Thanks ;)

Click here to make a donation via RegSoft.com
 
Disclaimer
 

This ASP Component is provided as is and without any guarantees or promises. You use it entirely at your own risk. You cannot hold me responsible if it crashes your machine, corrputs your registry, destroys your Micosoft Visual Studio 6.0 SP5 (which it was built on) or starts World War III. Since it's free, I do not guarantee performance, support or error-free operation.

 
Contact Information
 

This Webpage was written in a great hurry, so please don't judge the control on the appearance of this page. One day when I grow up, I'll make a decent page. If you wish to mail me any comments, feel free to do so at stefan@internext.co.za

 
accesses since 25 March 2000