const char * v = opj_version();
const OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY;
- int numcomps = 1;
- int i;
- int image_width = 256;
- int image_height = 256;
+ unsigned int numcomps = 1;
+ unsigned int i;
+ unsigned int image_width = 256;
+ unsigned int image_height = 256;
opj_cparameters_t parameters;
- int subsampling_dx = 0;
- int subsampling_dy = 0;
+ unsigned int subsampling_dx = 0;
+ unsigned int subsampling_dy = 0;
opj_image_cmptparm_t cmptparm;
opj_image_t *image;
for (i = 0; i < image_width * image_height; i++)
{
- int compno;
+ unsigned int compno;
for(compno = 0; compno < numcomps; compno++)
{
image->comps[compno].data[i] = 0;
opj_setup_encoder(l_codec, ¶meters, image);
- l_stream = opj_stream_create_default_file_stream_v3("testempty1.j2k",OPJ_FALSE);
+ l_stream = opj_stream_create_default_file_stream("testempty1.j2k",OPJ_FALSE);
assert(l_stream);
bSuccess = opj_start_compress(l_codec,image,l_stream);
if( !bSuccess )
{
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
opj_image_destroy(image);
return 0;
bSuccess = opj_end_compress(l_codec, l_stream);
assert( bSuccess );
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
opj_image_destroy(image);