~cosme/ubuntu/precise/freeimage/freeimage-3.15.1

« back to all changes in this revision

Viewing changes to Source/FreeImage/PluginJP2.cpp

  • Committer: Stefano Rivera
  • Date: 2010-07-24 15:35:51 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: stefanor@ubuntu.com-20100724153551-6s3fth1653huk31a
Tags: upstream-3.13.1
ImportĀ upstreamĀ versionĀ 3.31.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
                        io->seek_proc(handle, start_pos, SEEK_SET);
165
165
                        src = (BYTE*)malloc(file_length * sizeof(BYTE));
166
166
                        if(!src) {
167
 
                                throw "Memory allocation failed";
 
167
                                throw FI_MSG_ERROR_MEMORY;
168
168
                        }
169
169
                        if(io->read_proc(src, 1, file_length, handle) < 1) {
170
170
                                throw "Error while reading input stream";
247
247
                // set encoding parameters to default values
248
248
                opj_set_default_encoder_parameters(&parameters);
249
249
 
 
250
                parameters.tcp_numlayers = 0;
250
251
                // if no rate entered, apply a 16:1 rate by default
251
252
                if(flags == JP2_DEFAULT) {
252
253
                        parameters.tcp_rates[0] = (float)16;