ImageGear Professional for Windows ActiveX
How to Configure

ImageGear handles all of the memory mapped file operations internally, except for a specific case discussed in the next section. The application only needs to set a few parameters to enable the usage of memory mapped files and adjust it to its needs.

The usage of memory mapped files is controlled by three global control parameters:

All three parameters DIB.FILE_MAPPING.THRESHOLD, DIB.FILE_MAPPING.PATH, and DIB.FILE_MAPPING.FLUSH_SIZE are taken into account at the time of the DIB creation. After the DIB has been created, changing these parameters will not have an effect on the storage of this DIB, or flush frequency during its processing. However, if some operation replaces the DIB in an IGPage Object (e.g., Resize, Rotate), a new DIB will be created according to the current DIB.FILE_MAPPING.THRESHOLD and DIB.FILE_MAPPING.PATH values, and will then be processed according to the DIB.FILE_MAPPING.FLUSH_SIZE value at the time of the DIB replacement.

The following example tells ImageGear to use memory mapped files for images whose pixel data size is equal to or greater than 500 MB:

 
Copy Code
Set currentParameter =
IGCoreCtl1.CreateObject(IG_OBJ_GLOBAL_PARAM)
currentParameter.Value.ChangeType IG_DATA_LONG
currentParameter.info = ""
currentParameter.name = "DIB.FILE_MAPPING.THRESHOLD"
currentParameter.Value.Long = 500
IGCoreCtl1.Settings.UpdateParamFrom currentParameter

The following example tells ImageGear to create temporary memory-mapped files in the current directory:

 
Copy Code
' Keep memory mapping files in the current directory
Set currentParameter =
IGCoreCtl1.CreateObject(IG_OBJ_GLOBAL_PARAM)
currentParameter.Value.ChangeType IG_DATA_STRING
currentParameter.info = ""
currentParameter.name = "DIB.FILE_MAPPING.PATH"
currentParameter.Value.String = "."
IGCoreCtl1.Settings.UpdateParamFrom currentParameter

The following example tells ImageGear to set the flush size to 100 Mb:

 
Copy Code
' Set the memory mapping flush size to 100 Mb
Set currentParameter =
IGCoreCtl1.CreateObject(IG_OBJ_GLOBAL_PARAM)
currentParameter.Value.ChangeType IG_DATA_LONG
currentParameter.info = ""
currentParameter.name = "DIB.FILE_MAPPING.FLUSH_SIZE"
currentParameter.Value.Long = 100
IGCoreCtl1.Settings.UpdateParamFrom currentParameter

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback