R
Ramon F Herrera
I have an application whose purpose is to open, display and rezise TIFF
files.
My application is written mainly in Java, but it uses C/C++ through
JNI.
I purchased a OCR library which receives calls form the Java side using
_simple_ types of arguments such as int, floats and strings. For
instance, to have a file analized I just pass its filesystem path (i.e.
a string) to the C/C++ OCR library.
My next version has to provide some extended functionality and I wonder
if JNI is up to the task. More specifically, I would like to have
resizing features similar to those provided by Acrobat: click on a plus
sign and the image becomes bigger, type a percentage or move a sliding
tool and the images is resized.
After looking hard and long, it seems that the only libraries that can
perform that resampling with an acceptable level of quality and speed
are written in C/C++.
Now the question: as said above, I know I can pass an int or a string
between the Java side and the C/C++ side, but what about more complex
variables? Can I open a file in Java and pass some sort of handle to
it to the C library?
What are the limitations of JNI in terms of passing "objects" back &
forth?
TIA.
-Ramon F Herrera
files.
My application is written mainly in Java, but it uses C/C++ through
JNI.
I purchased a OCR library which receives calls form the Java side using
_simple_ types of arguments such as int, floats and strings. For
instance, to have a file analized I just pass its filesystem path (i.e.
a string) to the C/C++ OCR library.
My next version has to provide some extended functionality and I wonder
if JNI is up to the task. More specifically, I would like to have
resizing features similar to those provided by Acrobat: click on a plus
sign and the image becomes bigger, type a percentage or move a sliding
tool and the images is resized.
After looking hard and long, it seems that the only libraries that can
perform that resampling with an acceptable level of quality and speed
are written in C/C++.
Now the question: as said above, I know I can pass an int or a string
between the Java side and the C/C++ side, but what about more complex
variables? Can I open a file in Java and pass some sort of handle to
it to the C library?
What are the limitations of JNI in terms of passing "objects" back &
forth?
TIA.
-Ramon F Herrera