\r
/*\r
* Class: org_opencv_android_Utils\r
- * Method: void nBitmapToMat(Bitmap b, long m_addr, boolean unPremultiplyAlpha)\r
+ * Method: void nBitmapToMat2(Bitmap b, long m_addr, boolean unPremultiplyAlpha)\r
*/\r
\r
-JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat\r
+JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat2\r
(JNIEnv * env, jclass, jobject bitmap, jlong m_addr, jboolean needUnPremultiplyAlpha);\r
\r
-JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat\r
+JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat2\r
(JNIEnv * env, jclass, jobject bitmap, jlong m_addr, jboolean needUnPremultiplyAlpha)\r
{\r
AndroidBitmapInfo info;\r
}\r
}\r
\r
+// old signature is left for binary compatibility with 2.4.0 & 2.4.1, to removed in 2.5\r
+JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat\r
+ (JNIEnv * env, jclass, jobject bitmap, jlong m_addr);\r
+\r
+JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat\r
+ (JNIEnv * env, jclass, jobject bitmap, jlong m_addr)\r
+{\r
+ Java_org_opencv_android_Utils_nBitmapToMat2(env, 0, bitmap, m_addr, false);\r
+} \r
+\r
/*\r
* Class: org_opencv_android_Utils\r
- * Method: void nMatToBitmap(long m_addr, Bitmap b, boolean premultiplyAlpha)\r
+ * Method: void nMatToBitmap2(long m_addr, Bitmap b, boolean premultiplyAlpha)\r
*/\r
-JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap\r
+\r
+JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap2\r
(JNIEnv * env, jclass, jlong m_addr, jobject bitmap, jboolean needPremultiplyAlpha);\r
\r
-JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap\r
+JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap2\r
(JNIEnv * env, jclass, jlong m_addr, jobject bitmap, jboolean needPremultiplyAlpha)\r
{\r
AndroidBitmapInfo info;\r
}\r
}\r
\r
+// old signature is left for binary compatibility with 2.4.0 & 2.4.1, to removed in 2.5\r
+JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap\r
+ (JNIEnv * env, jclass, jlong m_addr, jobject bitmap);\r
+\r
+JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap\r
+ (JNIEnv * env, jclass, jlong m_addr, jobject bitmap)\r
+{\r
+ Java_org_opencv_android_Utils_nMatToBitmap2(env, 0, m_addr, bitmap, false);\r
+}\r
+\r
} // extern "C"\r
throw new java.lang.IllegalArgumentException("bmp == null");
if (mat == null)
throw new java.lang.IllegalArgumentException("mat == null");
- nBitmapToMat(bmp, mat.nativeObj, unPremultiplyAlpha);
+ nBitmapToMat2(bmp, mat.nativeObj, unPremultiplyAlpha);
}
/**
throw new java.lang.IllegalArgumentException("mat == null");
if (bmp == null)
throw new java.lang.IllegalArgumentException("bmp == null");
- nMatToBitmap(mat.nativeObj, bmp, premultiplyAlpha);
+ nMatToBitmap2(mat.nativeObj, bmp, premultiplyAlpha);
}
/**
System.loadLibrary("opencv_java");
}
- private static native void nBitmapToMat(Bitmap b, long m_addr, boolean unPremultiplyAlpha);
+ private static native void nBitmapToMat2(Bitmap b, long m_addr, boolean unPremultiplyAlpha);
- private static native void nMatToBitmap(long m_addr, Bitmap b, boolean premultiplyAlpha);
+ private static native void nMatToBitmap2(long m_addr, Bitmap b, boolean premultiplyAlpha);
}