ImageGear Professional for Windows ActiveX
Introduction to Format Filters

As discussed in ImageGear Format Filters, there are a set of specialized ImageGear objects called "Format Filters" that assist IGFormatsCtl Control in the loading and saving of files. See the File Format Reference for more information on the various file types supported by ImageGear. There are many file types that are automatically supported by the IGFormatsCtl Control - if your application only needs to deal with those file types, then you don't need to use ImageGear Format Filters.

On the other hand, if your application must load or save any of the following file types, then you will need to augment the default IGFormatsCtl Control handling with the appropriate Format Filter:

In the absence of any Format Filters, the start-up sequence to prepare for file loading is as follows:

VB
Copy Code
IGCoreCtl1.License.SetSolutionName "Accusoft"
IGCoreCtl1.Result.NotificationMode = IG_ERR_NO_ACTION
IGCoreCtl1.AssociateComponent IGFormatsCtl1.ComponentInterface

If your application required the use of one of these Format Filters, but failed to use it, then an attempt to load a file of the corresponding type would result in an 80020009 ("Could not detect the format of this file.") error.

The steps needed to activate any of the Format Filters are as follows:

  1. Create an instance of the Format Filter object.
  2. Associate the Format Filter with the IGCoreCtl Control.

If our example application had to be able to handle ABIC files as well as any file compressed with the LZW algorithm, then the startup sequence would be as follows:

 
Copy Code
Attach ABIC Component 
Dim abic As IIGComponent 
Set abic = IGCoreCtl1.CreateComponent("GearABIC.IGABIC.1")
IGCoreCtl1.AssociateComponent abic.ComponentInterface 

For more information on ImageGear Format Filters, see the Working with Format Filters section.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback