L_Jp2ReadGMLDataMemory

Summary

Reads GML data stored in a JPEG 2000 file in memory.

Syntax

#include "l_bitmap.h"

L_LTJP2_API L_INT EXT_FUNCTION L_Jp2ReadGMLDataMemory(hJp2, pBuffer, uBufferSize, pGMLData)

Parameters

L_HJP2 hJp2

JPEG 2000 engine handle.

L_UINT8 * pBuffer

Pointer to a JPEG 2000 file in memory.

L_SIZE_T uBufferSize

Size of the JPEG 2000 file in bytes.

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_Jp2ReadGMLDataMemory reads GML data stored in a JPEG 2000 file in memory. 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 Jp2ReadGMLDataMemoryExample(L_UINT8 * pFileBuffer, L_SIZE_T uFileSize) 
{ 
   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_Jp2ReadGMLDataMemory(hEngine, pFileBuffer, uFileSize, &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; 
} 

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.