AutoImageInfo Documentation
Version 1.5

A Product of United Binary, LLC.
http://www.unitedbinary.com
support@unitedbinary.com

AutoImageInfo is a web server component (COM and .NET) which queries the properties about image files in Active Server Pages (asp) or the ASP.NET framework. Both the .NET and COM components behave the same so this documentation, besides actual source code, will apply to both.

Documentation Sections
Setup / Installation
Usage Limitations and Licensing
Methods and Properties
Using the Component
Version History


Setup / Installation
  1. Run the distributed install program. You probably have already done this because that is the program that installs this documentation. In addition, it will install and register the AutoImageInfo COM component. It will add "check for update" links. It will install a copy of the AutoImageInfo .NET component. But be careful, the .NET component needs to be placed in the bin directory of your web application (it is not globally registering like COM components). See the "Using the Component" section for more info.

Usage Limitations and Licensing

By using AutoImageInfo you are agreeing to abide by these requirements and restrictions:

Proper usage:

AutoImageInfo may be used in any web environment. This can be ASP pages, ASP.NET pages, Cold Fusion pages, COM or .NET components built to extend AutoImageInfo functioning only in a web environment provided these components are designed for use by people who in addition own an AutoImage Suite license.

Improper usage:

AutoImageInfo may not be used to create components which encapsulate AutoImageInfo's functionality where these components are intended to be redistributed.

AutoImageInfo may not be used outside of a web environment. This is due to an agreement between the Smaller Animals Software Company and United Binary which allows us to use their graphics processing library in the limited scope of web page image processing.


Methods and Properties

AutoImageInfo uses a combination of properties () and methods ( ) to acheive its functionality. Here is the current list of them grouped by functionality. All properties are read only. The method / property types will be specified for the benefit of the .NET users. ASP 3.0 users can safely use variants (not that they have a choice).

File IO

ReadHeader(string file) Read the image and file properties from the image file.

Image Information

ImageWidth (int) [read only] Image width in pixels.
ImageHeight (int) [read only] Image height in pixels.
FileSize (long) [read only] File size in bytes.

ImageFileFormat 
     (string) [read only]
Image file format.  The supported file formats are

Value

File Type

BMP

Windows Bitmap

JPG

JPEG

PCX

PCX

PNG

Portable Network Graphic

PSD

Photoshop Document

TGA

Targa

TIF

TIFF

FileDateTime (Date)
  [read only]
Last modified time in date format.
Processing Time
  (double) [read only]
Time spent processing the ReadHeader() method call in milliseconds.


 Using the Component

Here is a series of minimal web pages using AutoImageInfo.


ASP 3.0 and VBScript

The following page creates an AutoImageInfo COM component.  Then sets the filename, reads the image header and file properties, then uses the properties to write out the gathered information.

<%@ Language=VBScript %>
<% 
   set info = Server.CreateObject("UnitedBinary.AutoImageInfo")
   info.ReadHeader "C:\inetpub\wwwroot\software\images\1stamp.jpg"
%>
<HTML>
<HEAD>
   <META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
</HEAD>
<BODY>
   <p>
      Image<br>
      <img src="/software/images/1stamp.jpg"></p>
   <p>
   File Format = <%=info.ImageFileFormat%><br>
   File Size = <%=info.FileSize%> bytes<br>
   Image Width = <%=info.ImageWidth%><br>
   Image Height = <%=info.ImageHeight%><br>
   Modified Time = <%=info.FileDateTime%><br>
   Processing Time = <%=info.ProcessingTime%> ms<br>
   </p>
</BODY>
</HTML>
<%
   set info = nothing
%>

ASP.NET and C#

The following page creates an AutoImageInfo .NET component. Then sets the filename, reads the image header and file properties, then uses the properties to write out the gathered information. The memory used by the object is freed via the .NET framwork garbage collector. Note, the UnitedBinary.AII.dll and Interop.ImgInfoLib.dll DLLs must be in the web application's bin directory for this to work.

<%@ Language=C# %>
<% 
   UnitedBinary.Imaging.AutoImageInfo aii = new UnitedBinary.Imaging.AutoImageInfo();
   aii.ReadHeader(@"C:\inetpub\wwwroot\software\images\1stamp.jpg");
%>
<HTML>
   <HEAD>
      <META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
   </HEAD>
   <BODY>
   <p>
      Image<br>
      <img src="/imageresizecache/stampout.jpg">
   </p>
   <p>
      File Format = <%=aii.Format%><br>
      File Size = <%=aii.Size%> bytes<br>
      Image Width = <%=aii.Width%><br>
      Image Height = <%=aii.Height%><br>
      Modified Time = <%=aii.LastModified%><br>
      Processing Time = <%=aii.ProcessingTime %> ms<br>
   </p>
</BODY>
</HTML>


Sample Web Page

If you are interested in the source code involved in using the component, please see the previous section.

If you want to see a web page using AutoImageInfo in action, have a look at:

    http://www.unitedbinary.com/AutoImageInfo.aspx

and follow the "Interactive Demonstration Page" link.


Version History

10/16/2003
Version 1.5.1.0
1. Rebuilt COM component with Visual Studio.NET 2003 and ATL 7.1.
2. Updated underlying graphics library to version 2.2.20.0.
3. Updated the C# and ASP.NET sample code (above) to use the full .NET wrapper.

1/28/2002
Version 1.1.2.23
1. Added .NET Final Release MS.NET component, AII now ships with Beta 2, Beta 2, RC1, and Final .NET components.
2. Updated underlying graphics library to version 2.1.15.1.

10/01/2001
Version 1.1.1.22
1. Minor internal changes.
2. Updated the underlying ImgSource graphics library to version 2.1.9.8.

06/23/2001
Version 1.1.0.21
1. Added a Beta 2 compatible MS.NET component. AII ships with a beta 1 and beta 2 component.
2. Updated the underlying ImgSource graphics library to version 2.1.7.0.

03/15/2001
Version 1.0.0.0 Initial Public Release