ragnraok / android-image-filter Goto Github PK
View Code? Open in Web Editor NEWsome android image filters
some android image filters
when i click restore button
not restore in sd card
after edit image i want to restore the edit image in my phone
please help me
if user picked an effect and didn't like it, how to undo that change?
When importing the proyect throws the following error:
[2013-07-19 18:18:21 - Unable to launch cygpath. Is Cygwin on the path?] java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, System cannot find the specified file.
after googling a bit in StackOverflow they mention that with the new NDK its not necessary to have cygwin: http://stackoverflow.com/a/15464640
I suppose this means that the proyect should be re-compiled again with the new NDK.
Firstly, your work really helps a lot and thank you very much!
I have checked all the filters, it seems that there is no related filter to Bilateral Filter. Is it because I didn't find the proper name or this library does not support bilateral filter?
I download your 'android-image-filter' file and it didn't show any error.
But when I click 'Select an image' and choose one from my gallery, it can't show the image.
It shows 'Please select an image' after I click a filter.
And I install the apk, still can't show any image.
No service of type Factory available in ProjectScopeServices.
I added this library to my projects, it works properly on some devices but it does not on some others.
System.loadLibrary line, throws an exception because library cannot be loaded. I unzip the apk and check libAndroidImageFilter.so is created for all architecture.
There is no common among problematic devices. Some of them are KitKat whereas some other are JellyBean. Most of them are Samsung but there are also several HTC. Also there are a Samsung devices which does not have any crash. Furthermore, even though all of them has armv7 based cpu, there are a few armv7 based devices on which the library is able to run.
In short, I have no idea why it crashes on some devices.
Hi. I use android studio but i can't use your's library. How to use it ?
When I apply Gaussian Blur to a bitmap with alpha channel, the alpha channel changes to black. While the alpha channel is good if I use RenderScript. Is it possible to keep the alpha channel in the filtering process?
I find quite complicated having to build myself the library to use it. Google now provide all the tools to package yout library as aar file with gradle environnement. You can also deploy the produced aar artefact to a maven repository
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for int[] com.example.jigneshjc.portraphoto.portra_FILTER.NativeFilterFunc.oilFilter(int[], int, int, int) (tried Java_com_example_jigneshjc_portraphoto_portra_1FILTER_NativeFilterFunc_oilFilter and Java_com_example_jigneshjc_portraphoto_portra_1FILTER_NativeFilterFunc_oilFilter___3IIII)
at com.example.jigneshjc.portraphoto.portra_FILTER.NativeFilterFunc.oilFilter(Native Method)
at com.example.jigneshjc.portraphoto.portra_FILTER.OilFilter.changeToOil(OilFilter.java:21)
at com.example.jigneshjc.portraphoto.portra_FILTER.BitmapFilter.changeStyle(BitmapFilter.java:36)
Hi,
First of all, thank you for the great job on this.
I am trying it out thru the demo app in this project.
However, eveytime when I apply an effect then the demo app stops unexpectedly.
Here are some examples of what I got when the unexpected stop happens:
Could the memory cause this issue ?
What could the root cause ?
Thank you
I would like to kindly ask you, what is the way, to apply a filterto live camera picture ? As I know, you had showd examples where you are applying the filter on an already created picture. I would like to do the same on live picture.
Thx, K
06-09 07:03:23.279: E/AndroidRuntime(2635): FATAL EXCEPTION: main
06-09 07:03:23.279: E/AndroidRuntime(2635): java.lang.ExceptionInInitializerError
06-09 07:03:23.279: E/AndroidRuntime(2635): at cn.Ragnarok.BitmapFilter.changeStyle(BitmapFilter.java:80)
06-09 07:03:23.279: E/AndroidRuntime(2635): at com.extremecamera.ActPhotoEditor$1.onClick(ActPhotoEditor.java:50)
06-09 07:03:23.279: E/AndroidRuntime(2635): at android.view.View.performClick(View.java:4084)
06-09 07:03:23.279: E/AndroidRuntime(2635): at android.view.View$PerformClick.run(View.java:16966)
06-09 07:03:23.279: E/AndroidRuntime(2635): at android.os.Handler.handleCallback(Handler.java:615)
06-09 07:03:23.279: E/AndroidRuntime(2635): at android.os.Handler.dispatchMessage(Handler.java:92)
06-09 07:03:23.279: E/AndroidRuntime(2635): at android.os.Looper.loop(Looper.java:137)
06-09 07:03:23.279: E/AndroidRuntime(2635): at android.app.ActivityThread.main(ActivityThread.java:4745)
06-09 07:03:23.279: E/AndroidRuntime(2635): at java.lang.reflect.Method.invokeNative(Native Method)
06-09 07:03:23.279: E/AndroidRuntime(2635): at java.lang.reflect.Method.invoke(Method.java:511)
06-09 07:03:23.279: E/AndroidRuntime(2635): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
06-09 07:03:23.279: E/AndroidRuntime(2635): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
06-09 07:03:23.279: E/AndroidRuntime(2635): at dalvik.system.NativeStart.main(Native Method)
06-09 07:03:23.279: E/AndroidRuntime(2635): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load AndroidImageFilter: findLibrary returned null
06-09 07:03:23.279: E/AndroidRuntime(2635): at java.lang.Runtime.loadLibrary(Runtime.java:365)
06-09 07:03:23.279: E/AndroidRuntime(2635): at java.lang.System.loadLibrary(System.java:535)
06-09 07:03:23.279: E/AndroidRuntime(2635): at cn.Ragnarok.SharpenFilter.(SharpenFilter.java:11)
06-09 07:03:23.279: E/AndroidRuntime(2635): ... 13 more
What went wrong:
Execution failed for task ':library:transformNativeLibsWithStripDebugSymbolForDebug'.
A problem occurred starting process 'command 'D:\androidStudio\sdk\ndk-bundle\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\bin\mips64el-linux-android-strip''
Hi there,
Two things I would like to understand -
I have tried this simple code -
im = (ImageView) findViewById(R.id.imageView1);
Bitmap bm = BitmapFactory.decodeResource(getResources(),R.drawable.pic);
Bitmap newBitmap = BitmapFilter.changeStyle(bm, BitmapFilter.BLUR_STYLE);
im.setImageBitmap(newBitmap);
The thing is that the app is crushing and i get the java.lang.OutOfMemoryError.
java.lang.UnsatisfiedLinkError: No implementation found for int[] com.example.cn.Ragnarok.NativeFilterFunc.oilFilter(int[], int, int, int) (tried Java_com_example_cn_Ragnarok_NativeFilterFunc_oilFilter and Java_com_example_cn_Ragnarok_NativeFilterFunc_oilFilter___3IIII)
at com.example.cn.Ragnarok.NativeFilterFunc.oilFilter(Native Method)
at com.example.cn.Ragnarok.OilFilter.changeToOil(OilFilter.java:19)
at com.example.cn.Ragnarok.BitmapFilter.changeStyle(BitmapFilter.java:52)
at com.example.ShatteringActivity$ListAdapterEffect$1.onClick(ShatteringActivity.java:837)
at android.view.View.performClick(View.java:5246)
at android.view.View$PerformClick.run(View.java:21256)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
I am randomly getting fatal signal 11 (sigsegv) code 2.
attempting to use
public static final int SOFT_GLOW_STYLE = 16; // soft glow as a filter makes the app crash returning this in the LogCat:
07-19 19:40:42.149: E/AndroidRuntime(3871): FATAL EXCEPTION: main
07-19 19:40:42.149: E/AndroidRuntime(3871): java.lang.UnsatisfiedLinkError: softGlow
07-19 19:40:42.149: E/AndroidRuntime(3871): at cn.Ragnarok.NativeFilterFunc.softGlow(Native Method)
07-19 19:40:42.149: E/AndroidRuntime(3871): at cn.Ragnarok.SoftGlowFilter.softGlowFilter(SoftGlowFilter.java:13)
07-19 19:40:42.149: E/AndroidRuntime(3871): at cn.Ragnarok.BitmapFilter.changeStyle(BitmapFilter.java:95)
07-19 19:40:42.149: E/AndroidRuntime(3871): at com.mytest.test.activity.PhotoTestActivity.onClick(PhotoTestActivity.java:107)
07-19 19:40:42.149: E/AndroidRuntime(3871): at android.view.View.performClick(View.java:2485)
07-19 19:40:42.149: E/AndroidRuntime(3871): at android.view.View$PerformClick.run(View.java:9080)
07-19 19:40:42.149: E/AndroidRuntime(3871): at android.os.Handler.handleCallback(Handler.java:587)
07-19 19:40:42.149: E/AndroidRuntime(3871): at android.os.Handler.dispatchMessage(Handler.java:92)
07-19 19:40:42.149: E/AndroidRuntime(3871): at android.os.Looper.loop(Looper.java:130)
07-19 19:40:42.149: E/AndroidRuntime(3871): at android.app.ActivityThread.main(ActivityThread.java:3687)
07-19 19:40:42.149: E/AndroidRuntime(3871): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 19:40:42.149: E/AndroidRuntime(3871): at java.lang.reflect.Method.invoke(Method.java:507)
07-19 19:40:42.149: E/AndroidRuntime(3871): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
07-19 19:40:42.149: E/AndroidRuntime(3871): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
07-19 19:40:42.149: E/AndroidRuntime(3871): at dalvik.system.NativeStart.main(Native Method)
This is beeing run on a Samsung Galaxy Ace (GT-S5830L) with Android Version 2.3.4 Gingerbread
oil painting doesn't covers whole image. There is some padding from all of the borders.
Dear RagnarokStack,
I have used your library android-image-filter. It is very helpful and good implemented. Thanks a lot!
But filters leave a small border around an image untouched, how to solve this problem?
Sincerely,
Y.P.
Hi!
Now Android Studio (1.5.1) supports very well NDK.
I am able to import it, but I cannot found a way to import this project as a library or AAR file.
I think it is not difficult to do it so you can add information about how to compile it. Thankyou!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.