Skip to content

Commit

Permalink
增加特效字符串对于null和 '\0' 在java层的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
wysaid committed Nov 20, 2015
1 parent 80c3336 commit ee326e9
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions library/src/main/java/org/wysaid/nativePort/CGENativeLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,25 @@ public static TextureResult loadTextureByName(String sourceName) {
return result;
}

public static Bitmap filterImage_MultipleEffects(Bitmap bmp, String config, float intensity) {
if(config == null || config == "") {
return bmp;
}
return cgeFilterImage_MultipleEffects(bmp, config, intensity);
}

public static void filterImage_MultipleEffectsWriteBack(Bitmap bmp, String config, float intensity) {
if(config != null && config != "") {
cgeFilterImage_MultipleEffectsWriteBack(bmp, config, intensity);
}
}

// 多重特效滤镜, 提供配置文件内容直接进行, 返回相同大小的bitmap。
// intensity 表示滤镜强度 [0, 1]
public static native Bitmap filterImage_MultipleEffects(Bitmap bmp, String config, float intensity);
public static native Bitmap cgeFilterImage_MultipleEffects(Bitmap bmp, String config, float intensity);

// 同上, 结果直接写回传入bitmap, 无返回值
public static native void filterImage_MultipleEffectsWriteBack(Bitmap bmp, String config, float intensity);
public static native void cgeFilterImage_MultipleEffectsWriteBack(Bitmap bmp, String config, float intensity);

////////////////////////////////////

Expand Down

0 comments on commit ee326e9

Please sign in to comment.