Hi Devon,
This is certainly cool, as I never tried to run the CMM under android. You have an automated testbed that will check every single feature and report a detailed diagnostic. Just compile testcms2.c and link together with -llcms2. If the test runs smoothly, then you got a working CMM under android. Chances are that it would work. Hope so.
Please let us know if any success (or failure if that's the case). Regards Marti El 16/05/2013 18:32, Devon Yoo escribió:
Hi guys.. I have been trying to use just a several lines of codes from lcms in Android NDK but still haven't completed it..Here's what I did: 1. copy whole library folder under jni folder in java project. (ex. {project-dir}/jni/lcms2-2.2 ) 2. add compile/build info in android.mk <http://android.mk> LCMS_SRC_PATH := lcms2-2.2/ LOCAL_C_INCLUDES := \ ${LCMS_SRC_PATH}include/ \ LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmscam02.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmserr.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmstypes.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsmd5.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmswtpnt.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsgmt.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmspcs.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsopt.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmscnvrt.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsps2.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmssamp.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsplugin.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsmtrx.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmspack.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsio0.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsgamma.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmscgats.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsxform.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsnamed.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmssm.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsio1.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsintrp.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmslut.c LOCAL_SRC_FILES +=${LCMS_SRC_PATH}src/cmsvirt.c LOCAL_LDLIBS += -llog -ldl -L../lib -lGLESv1_CM include $(BUILD_SHARED_LIBRARY) 3. in a cpp file, I added lcms source code #include "lcms2.h"string icc1 = RESOURCE_DIRECTORY + "/storage/emulated/extSdCard/ICC/CP01.icc"; string icc2 = RESOURCE_DIRECTORY + "/storage/emulated/extSdCard/ICC/sRGB.icm";int width = dst->size[1]; int height = dst->size[0]; if(!cmsLoaded) { hInProfile = cmsOpenProfileFromFile(icc1.c_str(), "r"); hOutProfile = cmsOpenProfileFromFile(icc2.c_str(), "r"); cmsLoaded = true; } hTransform = cmsCreateTransform(hInProfile, TYPE_BGR_8, hOutProfile, TYPE_BGR_8, INTENT_PERCEPTUAL, 0); if(hInProfile && hOutProfile) { cmsDoTransform(hTransform, dst->data, dst->data, width*height); } The problem is hInProfile and hOutProfile are getting null all the time.Can any1 tell me what the problem is? Or can you give me a link of a nice tutorial of using lcms in Android NDK?------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Lcms-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lcms-user
------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d
_______________________________________________ Lcms-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lcms-user
