ImageGear for C and C++ on Windows v21.0 - Updated
API Reference Guide / ISIS Component API Reference / ISIS Component Functions Reference / Tag Functions / IG_ISIS_tag_get_long
In This Topic
    IG_ISIS_tag_get_long
    In This Topic

    Get current value of a tag of type long.

    Declaration:

     
    Copy Code
    AT_ERRCOUNT ACCUAPI IG_ISIS_tag_get_long(
            HISISDRV hDriver,
            AT_MODE nTag,
            WORD wIndex,
            LPLONG lplValue
    );
    

    Arguments:

    Name Type Description
    hDriver HISISDRV The handle to the driver.
    nTag AT_MODE Specifies the type long tag for which to return the current value.
    wIndex WORD Specifies the index of the element to get. Most tags have only one element, in which case wIndex must be zero. Use IG_ISIS_tag_get_length to determine how many elements a tag contains.
    lplValue LPLONG Points to the current value of the tag after this function completes.

    Return Value:

    Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

    Supported Raster Image Formats:

    This function does not process image pixels.

    Remarks:

    The IG_ISIS_tag_get_long function retrieves the long value that is the current value of the specified tag.

    Use IG_ISIS_tag_get_long to retrieve the current value of the type long tag specified in nTag. Use IG_ISIS_tag_get_length to get the number of elements in the tag. If the tag has only one element, wIndex must be zero. If the tag has multiple elements (such as IG_ISIS_TAG_GAMMA_TABLE1), loop on IG_ISIS_tag_get_long to obtain all elements of the current value of the tag.

    Use of IG_ISIS_tag_get_long on a tag other than one of type long, short, or byte is undefined. At best, this will cause an invalid return value or a operating system error message, and at worst will cause the system to crash.

    Example:

    The following example gets the value of each element of a multiple value tag and puts them into an array:

     
    Copy Code
    BYTE caGamma[256];
    DWORD dwCount;
    LONG lValue;IG_ISIS_tag_get_length(hDriver, IG_ISIS_TAG_GAMMA_TABLE1, &dwCount);
    while (dwCount--) {IG_ISIS_tag_get_long(hDriver, IG_ISIS_TAG_GAMMA_TABLE1, dwCount, &lValue);
            caGamma[ulCount] = (BYTE) lValue;
    }
    /* Now that you have the values in an array, you can do something                                                                                                               */
    /* with them in your own function, such as:                                                     */
    showGamma(caGamma);
    

    See Also

    IG_ISIS_tag_get_length

    IG_ISIS_tag_get_long_default

    IG_ISIS_tag_get_type

    IG_ISIS_tag_set_long