I'd like to use the Android fork of libjpeg-turbo for a stand-alone Android application, rather than integrating it into a build of Android itself (as described here). Can anyone point me at a guide or example of doing that?
Asked
Active
Viewed 830 times
2
-
it is well described there it's not integrating into an android build there it's just being compiled for skia and making skia using this library. read carefully mate. just compile it and make your program use + external/libjpeg-turbo instead of external/jpeg without deleting or renaming the external/jpeg/Android.mk file. let it just be there. it should work. – Sergey Benner Jan 31 '12 at 11:22
-
Sorry, you're right there. Thanks. – occulus Jan 31 '12 at 11:33
-
Actually, I'm not so sure you *are* right, the page certainly gives the impression they're talking about replacing libjpeg in the Android source tree. – occulus Jan 31 '12 at 12:11
-
yes, they are talking about adding it to the source tree but replacing for the WHOLE system is rather optional there. you will have to disable external/jpeg/ explicitly to force system using the turbo library. – Sergey Benner Jan 31 '12 at 12:19
-
Ah thanks, ok. What's I'm missing then is how to use that modified source tree when building my app. How is that part done? I know that I can rebuild the source, the use the modified libjpeg lib in my project -- is that the most obvious way? – occulus Jan 31 '12 at 21:53
-
1yes as it is written - you put the compiled jpegturbo library into the external/libjpeg-turbo and include the following line +external/libjpeg-turbo in your Android.mk file in order to use it. plus you will have to see if there're any explicit library usages like -llibjpeg or something like that in your make file. – Sergey Benner Jan 31 '12 at 22:34
-
Thanks for your help Sergey, have the lib built and in my project. Now just need to find a good example of using it... – occulus Feb 01 '12 at 10:52
-
1http://code.google.com/p/sumatrapdf/source/browse/trunk/ext/libjpeg-turbo/example.c?r=2397 found one - besides the other you'd already found – Sergey Benner Feb 01 '12 at 11:26