From d70a0415b910cc5a3550fea1d777ded84d4cdfa0 Mon Sep 17 00:00:00 2001 From: Giuseppe Baruffa Date: Fri, 7 Sep 2007 23:16:31 +0000 Subject: 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 --- OPJViewer/source/imagjp2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OPJViewer/source/imagjp2.cpp') diff --git a/OPJViewer/source/imagjp2.cpp b/OPJViewer/source/imagjp2.cpp index 70be1555..7328e807 100644 --- a/OPJViewer/source/imagjp2.cpp +++ b/OPJViewer/source/imagjp2.cpp @@ -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(); -- cgit v1.2.3