On Thu, May 24, 2012 at 10:05 PM, Dan <
ruby.des...@gmail.com> wrote:
> First of all I am glad to see OpenJPEG decodes JPEG2000 with Region of
> Interest sections and converts to the requested output format from the
> command line. The Java Advanced Imaging and Java Image I/O libraries
> would not handle the compressed area. Now I am trying to use the
> OpenJPEG functionality from Java. My question is what filename needs
> to be specified to the constructor for "OpenJPEGJavaDecoder"? The
> only ".dll" that was built is listed below. That and other variations
> yield "OpenJPEG Java Decoder: probably impossible to find the C
> library".
>
> String openJPEGFilename = "c:/Users/dan/Downloads/openjpeg/
> openjpeg-read-only/build/libopenjpeg/.libs/cygopenjpeg-1.dll";
This look like a very odd path. Try a 'make install' step to make sure
everything is installed properly.
> File openJPEGFile = new File(openJPEGFilename);
> if (!openJPEGFile.exists())
> {
> throw new IOException("The open jpeg file " + openJPEGFilename +
> " does not exist.");
> } // if
>
> openJPEGJavaDecoder = new OpenJPEGJavaDecoder(openJPEGFilename);
Well I guess the path to the lib is ok. So the only other reason why
.load() would fail is that it does not find dependend libraries. Use
depends (dependecy walker) to make sure all dll can be resolved at
runtime.
HTH
--
Mathieu