L_Jp2ReadCompositeMemory (original) (raw)
Summary
Loads all frames bitmaps (Color, Opacity and Pre-multiplied opacity) stored in the specified JPEG 2000 file in memory.
Syntax
#include "l_bitmap.h"
L_LTJP2_API L_INT EXT_FUNCTION L_Jp2ReadCompositeMemory(hJp2, pBuffer, uBufferSize, pComposite, nBitsPerPixel, nOrder, pLoadOptions, pFileInfo, pReadCallBack, pUserData)
Parameters
L_HJP2 hJp2
JPEG 2000 engine handle that was created by the L_Jp2Create function.
L_UINT8 * pBuffer
Pointer to a JPEG 2000 file in memory.
L_SIZE_T uBufferSize
Size of JPEG 2000 file in bytes.
pL_JP2_JPXCOMPOSITE pComposite
Pointer to the L_JP2_JPXCOMPOSITE structure that references L_JP2_JPXBITMAPS bitmaps to be filled with image data.
L_INT nBitsPerPixel
Resulting bitmap pixel depth. If zero [0], the bitmap will have the original files pixel depth (do not convert).
L_INT nOrder
The desired color order. Possible values are:
Value | Meaning |
---|---|
ORDER_RGB | [0] Read-green-blue order. |
ORDER_BGR | [1] Blue green-red order. |
ORDER_GRAY | [2] 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported in Document and Medical Imaging products only. |
0 | The data is 8 bits per pixel or less. |
ORDER_RGBORGRAY | [3] Load the image as red, green, blue, OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported in Document and Medical Imaging products only. |
ORDER_BGRORGRAY | [4] Load the image as blue, green, red, OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported in Document and Medical Imaging products only. |
ORDER_ROMM | [5] ROMM order. ROMM only supports 24 and 48-bit images. |
ORDER_BGRORGRAYORROMM | [6] Load the image as blue, green, red, OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported in Document and Medical Imaging products only. |
pLOADFILEOPTION pLoadOptions
Pointer to optional extended load options. Pass NULL to use the default load options.
pFILEINFO pFileInfo
Pointer to a FILEINFO structure. If nothing is known about the file pass NULL.
FILEREADCALLBACK pReadCallBack
Optional callback function for additional processing.
If you do not provide a callback function, pass NULL.
If you do provide a callback function, use the function pointer as the value of this parameter.
The callback function must adhere to the function prototype described in the FILEREADCALLBACK function.
L_VOID * pUserData
Void pointer that you can use to pass one or more additional parameters used by the callback function.
Returns
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Comments
L_Jp2ReadCompositeMemory loads all frames bitmaps stored in the specified JPEG 2000 file in memory (Color, Opacity and Pre-multiplied opacity). You must free this structure by calling the L_Jp2FreeComposite function. Also you must free structure bitmaps by calling the L_FreeBitmap function. All of the engines boxes will be reset and updated with the new loaded boxes only.
Required DLLs and Libraries
- LTJP2
- LTIMGEFX
- LFJ2K
- For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
Platforms
Win32, x64.
See Also
Functions
- L_Jp2Read
- L_Jp2ReadList
- L_Jp2ReadComposite
- L_Jp2ReadFrames
- L_Jp2Save
- L_Jp2SaveList
- L_Jp2SaveComposite
- L_Jp2AppendFrames
- L_Jp2ReadMemory
- L_Jp2ReadListMemory
- L_Jp2ReadFramesMemory
- L_Jp2SaveMemory
- L_Jp2SaveListMemory
- L_Jp2SaveCompositeMemory
- L_Jp2AppendFramesMemory
Topics
- Programming with JPEG 2000 Features
- Programming with JPX Features
- Raster Image Functions: Working with JPEG 2000
- Raster Image Functions: Working with JPX
Example
For an example, refer to L_Jp2SaveCompositeMemory.