Loads a JPEG 2000 file.
#include "l_bitmap.h"
L_LTJP2_API L_INT EXT_FUNCTION L_Jp2Read(hJp2, pszFile, pBitmap, nBitsPerPixel, nOrder, pLoadOptions, pFileInfo, pReadCallBack, pUserData)
JPEG 2000 engine handle that was created by the L_Jp2Create function.
Character string that contains the name of the JPEG 2000 file.
Pointer to the bitmap handle referencing the bitmap to be filled with image data.
Resulting bitmap pixel depth. If zero [0], the bitmap will have the original files pixel depth (do not convert).
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/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/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 OR as ROMM. 12 and 16-bit grayscale images are supported in Document/Medical imaging products only. |
Pointer to optional extended load options. Pass NULL to use the default load options.
Pointer to a FILEINFO structure. If nothing is known about the file, pass NULL.
Optional callback function for additional processing.
The callback function must adhere to the function prototype described in the FILEREADCALLBACK function.
Void pointer that you can use to pass one or more additional parameters used by the callback function.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
L_Jp2Read loads a JPEG 2000 file. If the file contains multiple images only the first image is returned. To load all images use either L_Jp2ReadListMemory or L_Jp2ReadCompositeMemory functions. To load a specific frame or frames, use the L_Jp2ReadFramesMemory function. pLoadOptions
is used for loading codestreams such as J2K codestreams. If any of the layers has opacity channels, it will be applied on the list bitmap unless the ELO_COLOR_COMPONENT_ONLY flag is set in pLoadOptions. All of the engines boxes will be reset and updated with the new loaded boxes only.
Win32, x64.
For an example, refer to L_Jp2Save.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document