ImageGear for C and C++ on Windows v20.0 - Updated
Global Control Parameters
User Guide > How to Work with ... > Global Control Parameters

ImageGear provides a set of API functions that allow you to add new global control parameters to your ImageGear application, set new values for existing global control parameters, and retrieve information about these parameters.

Adding or Modifying

To add a new global control parameter as well as to set new values for existing parameters, use the function IG_gctrl_item_set:

IG_gctrl_item_set(
        LPCHAR ControlID, 
        AT_MODE nValueType, 
        LPVOID lpValue, 
        DWORD dwValueSize, 
        LPCHAR lpTextInfo
);

This function will search for the global parameter specified by the ControlIDname (syntax: "<GRPNAME>.<Param name>"), and if it is found will set a new value for it. If it is not found, the function will add this new parameter to the global control parameters list. Through the lpTextInfo argument, you can also set the text description of the specified global parameter.

Retrieving Information

To retrieve information about the global control parameter, use the functions IG_gctrl_item_get and IG_gctrl_item_by_index_get:

IG_gctrl_item_get(
        LPCHAR CtrlID, 
        LPAT_MODE lpnValType, 
        LPVOID lpValue, 
        DWORD dwValSize, 
        LPDWORD lpdwValSize, 
        LPCHAR lpTextInfo, 
        DWORD dwTextBufSize, 
        LPDWORD lpdwTextInfoSize
);

IG_gctrl_item_by_index_get(
        UINT nIndex, 
        LPCHAR CtrlID, 
        DWORD dwIDSize, 
        LPAT_MODE lpnValType, 
        LPVOID lpValue, 
        DWORD dwValSize, 
        LPDWORD lpdwValSize, 
        LPCHAR lpTextInfo,
        DWORD dwTextBufSize, 
        LPDWORD lpdwTextInfoSize 
);

The first function returns the value and the text description of the global control parameter specified by name. The second function returns information about the control parameter specified by its index in the global parameters list. Both functions return FALSE if the specified global parameter is not found.

If you want to know the number of global control parameters currently existing in the global parameters list, call the function IG_gctrl_item_count_get:

IG_gctrl_item_count_get();

If you need to know an index of the global control parameter in the parameters array, use this function IG_gctrl_item_id_get:

IG_gctrl_item_id_get (
        UINT nIndex, 
        LPCHAR lpCtrlID, 
        UINT nBufSize
);

Descriptions of Global Control Parameters

The following table provides information about ImageGear Global Control Parameters:

Please use AM_TID_MAKELP(AM_TID_CHAR) for parameters using AM_TID_LP | AM_TID_CHAR type.

Global Control Parameter Type Default Value Available Values Description
COMM.PATH AM_TID_LP | AM_TID_CHAR <Path to the folder where ImageGear Core module is located> Any string Specifies the path to the folder containing ImageGear component modules. See IG_comm_comp_attach.
CPM.CMYK_PROFILE_PATH AM_TID_LP | AM_TID_CHAR <Path to the default CMYK profile; located in the same directory as ImageGear Core module.> Any string Specifies the path to the default CMYK color profile. See Using Color Profile Manager.
CPM.ENABLE_PROFILES AM_TID_AT_BOOL FALSE FALSE, TRUE Enables or disables the color profile manager. See Using Color Profile Manager.
CPM.ENABLE_RENDERING_INTENTS AM_TID_AT_BOOL FALSE FALSE, TRUE Enables or disables the usage of rendering intents in color profiles. By default, ImageGear uses Relative Colorimetric rendering intent. See Using Color Profile Manager.
CPM.RGB_PROFILE_PATH AM_TID_LP | AM_TID_CHAR <Path to the default RGB profile; located in the same directory as ImageGear Core module.> Any string Specifies the path to the default RGB color profile. See Using Color Profile Manager.
DIB.FILE_MAPPING.FLUSH_SIZE AM_TID_INT 200 Any non-negative integer Specifies the maximum size of a memory block in a DIB that can be processed without flushing the memory mapped file, in megabytes. Only used when "DIB.FILE_MAPPING.THRESHOLD" is greater than zero. Does not affect 1-bit images. See Working with Gigabyte-Sized Images.
DIB.FILE_MAPPING.PATH AM_TID_LP | AM_TID_CHAR <Empty string. ImageGear uses the system temporary folder for memory mapped files.> Any string Specifies the path to a folder where memory mapped files will be stored. Only used when "DIB.FILE_MAPPING.THRESHOLD" is greater than zero. Does not affect 1-bit images. See Working with Gigabyte-Sized Images.
DIB.FILE_MAPPING.THRESHOLD AM_TID_INT 0 Any non-negative integer Specifies minimum DIB size, in megabytes, for which the memory mapped file shall be used. Zero means that the use of memory mapped files is disabled. Does not affect 1-bit images. See Working with Gigabyte-Sized Images.
DIB.PIX_ACCESS_USE_LEGACY_MODE AM_TID_AT_LMODE IG_PIX_ACCESS_MODE_LEGACY IG_PIX_ACCESS_MODE_LEGACY = 0, IG_PIX_ACCESS_MODE_NEW = 1 Switches between "legacy" (14.4 and earlier) and "new" pixel access modes. See "Pixel Access Modes" in Accessing Image Pixels.
FLTR.METADATA_FORMAT AM_TID_LP | AM_TID_CHAR "binary" "binary", "text" Switches between binary and text representations for accessing metadata values. See "Non-Image Data Format" in Manipulating Image Data.
IO.BUFFER_SIZE AM_TID_DWORD 262144 Any non-negative integer Specifies the size of the internal buffer used for image reading. Set to 0 to disable bufferization. See "Setting the Buffer Size" in Loading and Saving.
MULT.PREFER_DIRECTSHOW_FOR_AVI_MPEG AM_TID_AT_BOOL TRUE FALSE, TRUE If TRUE, DirectShow is preferred for .avi,.mpg,*.mpeg files over QuickTime. If FALSE, the application that is used to load the file depends on which component was attached first and detects the file. See MULT.PREFER_DIRECTSHOW_FOR_AVI_MPEG.
PDF.ENABLE_POSTSCRIPT AM_TID_AT_BOOL TRUE FALSE, TRUE Enables or disables PostScript support in PDF component. See the PDF Getting Started with PDF section.
PDF.HOST_FONT_PATH AM_TID_LP | AM_TID_CHAR <Parameter is not set. ImageGear uses the system fonts directory.> Any string Specifies path to the system font directory. See IG_PDF_initialize.
PDF.PDF_RESOURCE_PATH AM_TID_LP | AM_TID_CHAR <Parameter is not set. ImageGear looks for PDF resources in <COMM.PATH>\Resource\PDF> Any string Specifies the path to the PDF resources directory. See IG_PDF_initialize.
PDF.PS_RESOURCE_PATH AM_TID_LP | AM_TID_CHAR <Parameter is not set. ImageGear looks for PDF resources in <COMM.PATH>\Resource\PS> Any string Specifies the path to the PostScript resources directory. See IG_PDF_initialize.
PDF.TMP_PATH AM_TID_LP | AM_TID_CHAR <Parameter is not set. ImageGear selects PDF/PS temporary directory according to system settings.> Any string

Specifies the path to the temporary directory for PDF component. See IG_PDF_initialize.

This parameter specifies the location where temp objects such�as scratch PDF files, scratch PS files, and PS font cache are created. This parameter should be set before the PDF component is initialized with IG_PDF_initialize.

VECTOR.DEFAULT_FONT_FAMILY AM_TID_LP | AM_TID_CHAR <Empty string, which means that the default font will be selected by the system.> Any string

Specifies the typeface name of TrueType font used to display text objects, if the typeface is not defined in the source image.

NOTE: The�default font chosen by the system may not support the full range of Unicode characters, such as Chinese, Japanese, or Korean. In order to display�such characters correctly, specify a font that supports them, e.g., Arial Unicode MS.

XMP.Parse AM_TID_AT_BOOL TRUE FALSE, TRUE Enables or disables the parsing of XMP stream when reading and writing metadata from/to image files. See "Working with XMP Metadata" in Access Image Metadata.
Is this page helpful?
Yes No
Thanks for your feedback.