L_Jp2ReadGMLData (original) (raw)

Summary

Reads GML data stored in a JPEG 2000 file.

Syntax

#include "l_bitmap.h"

L_LTJP2_API L_INT EXT_FUNCTION L_Jp2ReadGMLData(hJp2, pFileName, pGMLData)

Parameters

L_HJP2 hJp2

JPEG 2000 engine handle.

L_TCHAR * pFileName

Character string that contains the name of the JPEG 2000 file.

pL_JP2_GMLDATA pGMLData

Pointer to the L_JP2_GMLDATA structure that is filled by GML data stored in the file.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

L_Jp2ReadGMLData reads GML data stored in a JPEG 2000 file. You must free this structure by calling the L_Jp2FreeGMLData function.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This example reads GML data stored in JPEG 2000 file format

L_INT Jp2ReadGMLDataExample(L_VOID) { L_HJP2 hEngine; L_JP2_GMLDATA GMLData; L_INT nRet; // Create JPEG 2000 engine handle hEngine = L_Jp2Create(); // Read GML data GMLData.uStructSize = sizeof(L_JP2_GMLDATA); nRet = L_Jp2ReadGMLData(hEngine, MAKE_IMAGE_PATH("image1.jpx"), &GMLData); if (nRet != SUCCESS) return nRet; // Free GML data nRet = L_Jp2FreeGMLData(hEngine, &GMLData); if (nRet != SUCCESS) return nRet; // Destroy engine handle nRet = L_Jp2Destroy(hEngine); if (nRet != SUCCESS) return nRet; return SUCCESS; }

LEADTOOLS Raster Imaging C API Help