|
|
News Overview Download Order F.A.Q. More info Support Links Welcome QuickStart ActiveX Control C++ Wrapper J2K_Image open •easyDecode selectTiles getMetaData decode close J2K_Frames open getFrames getFrame operators close API Reference General getVersion getLastError getErrorStr getLastErrorStr Unlock Open / Close Open Close Info GetInfo GetInfoEx GetResolutions GetResDimensions GetMetaData Decoding EasyDecode SelectTiles Decode Cancel Debug StartLogging StopLogging |
J2K_Image::easyDecode You can use this "1-Call" shortcut to quickly add the decoding capabilities to your program.
int easyDecode(char *filename, char *options=0); Parameters filename Name of a JPEG 2000 image file. src_buffer Pointer to a memory buffer, containing a JPEG 2000 image file. src_size Size of data in the memory buffer (in bytes). resource_no The resource ID. See "Samples\C++\h_Resources" for the example of using resources. options Options string. See the list of valid options here.
Return value Returns J2KERR_SUCCESS or an error code if the function has failed. See the list of error codes here. Notes 1. First function is used to decode image from the file. The second - from the file, already loaded into the memory. 2. After the call, the buffer member of the J2K_Image class will contain the address of memory buffer with decoded image. 3. By default, the buffer will have 1 byte per pixel for grayscale images and 4 bytes per pixel for color images. You can change the default BPP using the options string. 4. You must not free the buffer. It will be automatically destroyed in J2K_Image::close() function. Example
J2K_Image image; J2K_Image class |
| 2004-2008 © Alex Saveliev |