Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed unused variables

  • Loading branch information...
commit 73198f4fc4c05d228dbedded8549f4fea2d3a881 1 parent 006323c
@ruckus authored
View
26 .idea/workspace.xml
@@ -72,16 +72,16 @@
<file leaf-file-name="ImageActivity.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/com/example/ImageActivity.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="49" column="99" selection-start="1520" selection-end="1520" vertical-scroll-proportion="0.0">
+ <state line="60" column="2" selection-start="1778" selection-end="1838" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="README.md" pinned="false" current="true" current-in-tab="true">
+ <file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="9" selection-start="390" selection-end="390" vertical-scroll-proportion="0.19591837">
+ <state line="2" column="135" selection-start="221" selection-end="221" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
@@ -96,10 +96,10 @@
</provider>
</entry>
</file>
- <file leaf-file-name="imageprocessing.c" pinned="false" current="false" current-in-tab="false">
+ <file leaf-file-name="imageprocessing.c" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/jni/imageprocessing.c">
<provider selected="true" editor-type-id="text-editor">
- <state line="40" column="53" selection-start="1134" selection-end="1134" vertical-scroll-proportion="0.0">
+ <state line="39" column="30" selection-start="1080" selection-end="1080" vertical-scroll-proportion="0.63673466">
<folding />
</state>
</provider>
@@ -122,10 +122,10 @@
<list>
<option value="$PROJECT_DIR$/jni/Android.mk" />
<option value="$PROJECT_DIR$/README" />
- <option value="$PROJECT_DIR$/jni/imageprocessing.c" />
<option value="$PROJECT_DIR$/res/layout/main.xml" />
<option value="$PROJECT_DIR$/src/com/example/ImageActivity.java" />
<option value="$PROJECT_DIR$/README.md" />
+ <option value="$PROJECT_DIR$/jni/imageprocessing.c" />
</list>
</option>
</component>
@@ -487,30 +487,30 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/jni/imageprocessing.c">
+ <entry file="file://$PROJECT_DIR$/res/layout/main.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="40" column="53" selection-start="1134" selection-end="1134" vertical-scroll-proportion="0.0">
+ <state line="9" column="30" selection-start="340" selection-end="340" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/res/layout/main.xml">
+ <entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
- <state line="9" column="30" selection-start="340" selection-end="340" vertical-scroll-proportion="0.0">
+ <state line="2" column="135" selection-start="221" selection-end="221" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/com/example/ImageActivity.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="49" column="99" selection-start="1520" selection-end="1520" vertical-scroll-proportion="0.0">
+ <state line="60" column="2" selection-start="1778" selection-end="1838" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/README.md">
+ <entry file="file://$PROJECT_DIR$/jni/imageprocessing.c">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="9" selection-start="390" selection-end="390" vertical-scroll-proportion="0.19591837">
+ <state line="39" column="30" selection-start="1080" selection-end="1080" vertical-scroll-proportion="0.63673466">
<folding />
</state>
</provider>
View
2  README.md
@@ -1,7 +1,5 @@
Same Android project on how to implement an image filter in C using the Android NDK.
-A basic Activity will adjust the brightness level of a bitmap according to user value.
-
Use the slider to select a brightness value that will be bounded from 1-10 and then click on the button to apply the brightness filter.
Screenshots from before and after:
View
4 jni/imageprocessing.c
@@ -22,9 +22,8 @@ static int rgb_clamp(int value) {
}
static void brightness(AndroidBitmapInfo* info, void* pixels, float brightnessValue){
- int xx, yy, red, green, blue, L;
+ int xx, yy, red, green, blue;
uint32_t* line;
- //float brightness = 1.6;
for(yy = 0; yy < info->height; yy++){
line = (uint32_t*)pixels;
@@ -51,6 +50,7 @@ static void brightness(AndroidBitmapInfo* info, void* pixels, float brightnessVa
}
}
+
JNIEXPORT void JNICALL Java_com_example_ImageActivity_brightness(JNIEnv * env, jobject obj, jobject bitmap, jfloat brightnessValue)
{
View
BIN  obj/local/armeabi/libimageprocessing.so
Binary file not shown
View
BIN  obj/local/armeabi/objs/imageprocessing/imageprocessing.o
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.