Encoder.cpp / Decoder.cpp [CharLS-55814]

Oct 26, 2010 at 12:45 PM

Hi everybody

I am using the latest snapshot version of the CharLS sources (obained a few days ago). I need to create 2 modules an encoder.ccp and a decoder.cpp. I am using this library in Ubuntu 9.10. In file test/compliance.ccp there is a small function with the following header:

/**
* @param strNameEncoded Filename in JPEG-LS format
* @param strNameRaw Filename in RAW format
* @param ioffs Offset used to read the header???
* @param bcheckEncode = true
*/
void DecompressFile(SZC strNameEncoded, SZC strNameRaw, int ioffs, bool bcheckEncode = true);

I've tried to use this function in my file (decoder.cpp http://dl.dropbox.com/u/1944285/decoder.cpp) but unfortunately the program said that the output file (in this case the raw file) was not found. 
In my opinion, the goal of this function is to open a .jls file decompress it and write it back in a .ppm image file. I need 2 .ccp files to compress and decompress grayscale
images. The file decoder.cpp is an example of a decoder. Can you give me some help to try understand how to do 2 modules one to compress and another one to decompress a grayscale image?

Best regards

Luís Matos

Coordinator
Oct 27, 2010 at 5:17 PM

The function you found is a helper function used for testing. 

Currently the API functions do not read files directly. You have to pass in byte arrays.

The public API functions to use are in interface.h