Adapted the JPWL and OPJViewer code to new interface; fixed a samll bug in JPWL which created large EPBs even when null protection was specified

This commit is contained in:
Giuseppe Baruffa
2007-09-07 23:16:31 +00:00
parent 3816e0edf4
commit d70a0415b9
11 changed files with 220 additions and 125 deletions

View File

@@ -135,6 +135,7 @@ bool wxJP2Handler::LoadFile(wxImage *image, wxInputStream& stream, bool verbose,
unsigned char *src = NULL;
unsigned char *ptr;
int file_length;
opj_codestream_info_t cstr_info; /* Codestream information structure */
// destroy the image
image->Destroy();
@@ -193,7 +194,7 @@ bool wxJP2Handler::LoadFile(wxImage *image, wxInputStream& stream, bool verbose,
cio = opj_cio_open((opj_common_ptr)dinfo, src, file_length);
/* decode the stream and fill the image structure */
opjimage = opj_decode(dinfo, cio);
opjimage = opj_decode(dinfo, cio, &cstr_info);
if (!opjimage) {
#ifndef __WXGTK__
wxMutexGuiEnter();