Skip to content

Commit e987c7e

Browse files
committed
fix readme syntax
1 parent 65bbdb5 commit e987c7e

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

README.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Android-GPUImage-Plus
2+
23
Image, Camera And Video Filters Based On OpenGL
34

45
>To get pure lib without ffmpeg(No feature of video recording), please checkout the branch [min](https://github.com/wysaid/android-gpuimage-plus/tree/min). The whole jni module will be less than 600KB.
@@ -9,9 +10,9 @@ See the `image deform demo`.
910

1011
![](screenshots/6.gif) ![](screenshots/5.gif)
1112

12-
## Gradle dependency ##
13+
## Gradle dependency
1314

14-
```
15+
```gradle
1516
repositories {
1617
jcenter()
1718
}
@@ -26,16 +27,17 @@ dependencies {
2627
}
2728
```
2829

29-
> Use other ffmpeg-library, see: https://github.com/wysaid/FFmpeg-Android.git
30+
> Use other ffmpeg-library, see: <https://github.com/wysaid/FFmpeg-Android.git>
3031
31-
## Abstract ##
32+
## Abstract
3233

33-
* This repo is an Android Studio Project, comprising "cgeDemo", "library" two sub-modules. Hundreds of built-in filters are available in the demo. 😋If you'd like to add your own filter, please take a look at the manual page. Or you can follow the demo code. The new custom filter should be written in C++.
34+
* This repo is an Android Studio Project, comprising "cgeDemo", "library" two sub-modules. Hundreds of built-in filters are available in the demo. 😋If you'd like to add your own filter, please take a look at the manual page. Or you can follow the demo code. The new custom filter should be written in C++.
3435

3536
* Demo and Library will be updated as needed. Welcome for your questions or PR.
3637

3738
* To build with the jni part, pleasae try:
38-
```
39+
40+
```shell
3941
export NDK=path/of/your/ndk
4042
cd folder/of/jni (android-gpuimage-plus/library/src/main/jni)
4143

@@ -62,18 +64,19 @@ your_path_to_ndk\ndk-bundle\ndk-build.cmd
6264
//CGEFFmpegNativeLibrary.avRegisterAll();
6365
```
6466

65-
> You can find precompiled libs here: [android-gpuimage-plus-libs](https://github.com/wysaid/android-gpuimage-plus-libs) (The precompiled '.so' files are generated with NDK-r16b)
67+
> You can find precompiled libs here: [android-gpuimage-plus-libs](https://github.com/wysaid/android-gpuimage-plus-libs) (The precompiled '.so' files are generated with NDK-r23b)
6668
6769
Note that the generated file "libFaceTracker.so" is not necessary. So just remove this file if you don't want any feature of it.
6870

6971
* iOS version: [https://github.com/wysaid/ios-gpuimage-plus](https://github.com/wysaid/ios-gpuimage-plus "http://wysaid.org")
7072

71-
## Manual ##
73+
## Manual
7274

73-
### 1. Usage ###
75+
### 1. Usage
7476

7577
___Sample Code for doing a filter with Bitmap___
76-
```
78+
79+
```java
7780
//Simply apply a filter to a Bitmap.
7881
@Override
7982
protected void onCreate(Bundle savedInstanceState) {
@@ -96,12 +99,13 @@ protected void onCreate(Bundle savedInstanceState) {
9699
}
97100
```
98101

99-
### 2. Custom Shader Filter ###
102+
### 2. Custom Shader Filter
103+
104+
#### 2.1 Write your own filter
100105

101-
#### 2.1 Write your own filter ####
102106
>Your filter must inherit [CGEImageFilterInterfaceAbstract](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/include/cgeImageFilter.h#L42) or its child class. Most of the filters are inherited from [CGEImageFilterInterface](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/include/cgeImageFilter.h#L57) because it has many useful functions.
103107
104-
```
108+
```cpp
105109
// A simple customized filter to do a color reversal.
106110
class MyCustomFilter : public CGE::CGEImageFilterInterface
107111
{
@@ -136,10 +140,11 @@ public:
136140

137141
>Note: To add your own shader filter with c++. [Please see the demo for further details](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/source/customFilter_N.cpp).
138142
139-
#### 2.2 Run your own filter ####
143+
#### 2.2 Run your own filter
140144

141145
__In C++, you can use a CGEImageHandler to do that:__
142-
```
146+
147+
```cpp
143148
//Assume the gl context already exists:
144149
//JNIEnv* env = ...;
145150
//jobject bitmap = ...;
@@ -161,7 +166,6 @@ jobject resultBitmap = handler.getResultBitmap(env);
161166

162167
>If no gl context exists, the class [CGESharedGLContext](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/interface/cgeSharedGLContext.h#L22) may be helpful.
163168
164-
165169
__In Java, you can simply follow the sample:__
166170

167171
See: [CGENativeLibrary.cgeFilterImageWithCustomFilter](https://github.com/wysaid/android-gpuimage-plus/blob/master/cgeDemo/src/main/java/org/wysaid/cgeDemo/TestCaseActivity.java#L123)
@@ -176,22 +180,22 @@ En: [https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-(E
176180

177181
Ch: [https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-(ZH)](https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-(ZH) "http://wysaid.org")
178182

179-
## Tool ##
183+
## Tool
180184

181185
Some utils are available for creating filters: [https://github.com/wysaid/cge-tools](https://github.com/wysaid/cge-tools "http://wysaid.org")
182186

183187
[![Tool](https://raw.githubusercontent.com/wysaid/cge-tools/master/screenshots/0.jpg "cge-tool")](https://github.com/wysaid/cge-tools)
184188

185-
## License ##
189+
## License
186190

187191
[MIT License](https://github.com/wysaid/android-gpuimage-plus/blob/master/LICENSE)
188192

189-
## Donate ##
193+
## Donate
190194

191195
Alipay:
192196

193197
![Alipay](https://raw.githubusercontent.com/wysaid/android-gpuimage-plus/master/screenshots/alipay.jpg "alipay")
194198

195-
Paypal:
199+
Paypal:
196200

197201
[![Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif "Paypal")](http://blog.wysaid.org/p/donate.html)

0 commit comments

Comments
 (0)