Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
600ad799
Commit
600ad799
authored
Jul 02, 2012
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restoring binary compatibility with 2.4.1
parent
5d6c90e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
10 deletions
+31
-10
utils.cpp
modules/java/generator/src/cpp/utils.cpp
+27
-6
android+Utils.java
modules/java/generator/src/java/android+Utils.java
+4
-4
No files found.
modules/java/generator/src/cpp/utils.cpp
View file @
600ad799
...
...
@@ -21,13 +21,13 @@ extern "C" {
/*
* Class: org_opencv_android_Utils
* Method: void nBitmapToMat(Bitmap b, long m_addr, boolean unPremultiplyAlpha)
* Method: void nBitmapToMat
2
(Bitmap b, long m_addr, boolean unPremultiplyAlpha)
*/
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nBitmapToMat
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nBitmapToMat
2
(
JNIEnv
*
env
,
jclass
,
jobject
bitmap
,
jlong
m_addr
,
jboolean
needUnPremultiplyAlpha
);
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nBitmapToMat
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nBitmapToMat
2
(
JNIEnv
*
env
,
jclass
,
jobject
bitmap
,
jlong
m_addr
,
jboolean
needUnPremultiplyAlpha
)
{
AndroidBitmapInfo
info
;
...
...
@@ -72,14 +72,25 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat
}
}
// old signature is left for binary compatibility with 2.4.0 & 2.4.1, to removed in 2.5
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nBitmapToMat
(
JNIEnv
*
env
,
jclass
,
jobject
bitmap
,
jlong
m_addr
);
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nBitmapToMat
(
JNIEnv
*
env
,
jclass
,
jobject
bitmap
,
jlong
m_addr
)
{
Java_org_opencv_android_Utils_nBitmapToMat2
(
env
,
0
,
bitmap
,
m_addr
,
false
);
}
/*
* Class: org_opencv_android_Utils
* Method: void nMatToBitmap(long m_addr, Bitmap b, boolean premultiplyAlpha)
* Method: void nMatToBitmap
2
(long m_addr, Bitmap b, boolean premultiplyAlpha)
*/
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nMatToBitmap
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nMatToBitmap2
(
JNIEnv
*
env
,
jclass
,
jlong
m_addr
,
jobject
bitmap
,
jboolean
needPremultiplyAlpha
);
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nMatToBitmap
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nMatToBitmap
2
(
JNIEnv
*
env
,
jclass
,
jlong
m_addr
,
jobject
bitmap
,
jboolean
needPremultiplyAlpha
)
{
AndroidBitmapInfo
info
;
...
...
@@ -143,4 +154,14 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap
}
}
// old signature is left for binary compatibility with 2.4.0 & 2.4.1, to removed in 2.5
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nMatToBitmap
(
JNIEnv
*
env
,
jclass
,
jlong
m_addr
,
jobject
bitmap
);
JNIEXPORT
void
JNICALL
Java_org_opencv_android_Utils_nMatToBitmap
(
JNIEnv
*
env
,
jclass
,
jlong
m_addr
,
jobject
bitmap
)
{
Java_org_opencv_android_Utils_nMatToBitmap2
(
env
,
0
,
m_addr
,
bitmap
,
false
);
}
}
// extern "C"
modules/java/generator/src/java/android+Utils.java
View file @
600ad799
...
...
@@ -90,7 +90,7 @@ public class Utils {
throw
new
java
.
lang
.
IllegalArgumentException
(
"bmp == null"
);
if
(
mat
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
(
"mat == null"
);
nBitmapToMat
(
bmp
,
mat
.
nativeObj
,
unPremultiplyAlpha
);
nBitmapToMat
2
(
bmp
,
mat
.
nativeObj
,
unPremultiplyAlpha
);
}
/**
...
...
@@ -120,7 +120,7 @@ public class Utils {
throw
new
java
.
lang
.
IllegalArgumentException
(
"mat == null"
);
if
(
bmp
==
null
)
throw
new
java
.
lang
.
IllegalArgumentException
(
"bmp == null"
);
nMatToBitmap
(
mat
.
nativeObj
,
bmp
,
premultiplyAlpha
);
nMatToBitmap
2
(
mat
.
nativeObj
,
bmp
,
premultiplyAlpha
);
}
/**
...
...
@@ -138,7 +138,7 @@ public class Utils {
System
.
loadLibrary
(
"opencv_java"
);
}
private
static
native
void
nBitmapToMat
(
Bitmap
b
,
long
m_addr
,
boolean
unPremultiplyAlpha
);
private
static
native
void
nBitmapToMat
2
(
Bitmap
b
,
long
m_addr
,
boolean
unPremultiplyAlpha
);
private
static
native
void
nMatToBitmap
(
long
m_addr
,
Bitmap
b
,
boolean
premultiplyAlpha
);
private
static
native
void
nMatToBitmap
2
(
long
m_addr
,
Bitmap
b
,
boolean
premultiplyAlpha
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment