Hello,
I needed to compare jpegs generated from the camera, so imported a
minimal distribution of awt and jai ... that part compiles fine.
JPEGImageDecoderImpl.java needs to load a jpeg shared library, so I
grabbed the IJG JPEG library and built the shared library with
NDK-1.6_r1 ... that built without any problem.
I then placed libjpeg.so under libs/armeabi/ in my project (Eclipse
3.4.1, SDK 1.5) and changed JPEGImageDecoderImpl.java's:
static {
<my_namespace>.image.codec.security.AccessController.doPrivileged
(
new
<my_namespace>.image.codec.security.LoadLibraryAction("jpeg"));
}
to :
static {
System.loadLibrary("jpeg");
}
according to OVERVIEW.TXT in the NDK.
Tried to run this, but see:
Caused by java.land.UnsatisfiedLinkError: initDecoder
at <my_namespace>.image.codec.JPEGImageDecoderImpl.initDecoder
(Native Method)
at <my_namespace>.image.codec.JPEGImageDecoderImpl.initDecoder.<init>
(JPEGImageDecoderImpl.java:133)
in logcat.
The init referenced is:
public JPEGImageDecoderImpl(InputStream in) {
if (in == null)
throw new IllegalArgumentException("InputStream is
null.");
input = in;
***-> initDecoder( InputStreamClass );
}
and the initDecoder method is:
private native void initDecoder(Class inputStrClass);
Does anyone have a clue what I am missing?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---