Giter Club home page Giter Club logo

android-image-filter's People

Contributors

ragnraok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-image-filter's Issues

Oil Style not applied fully

When applying the oil style to a big image (ImageView of size of screen) it doesn't apply the effect to the whole picture as seen here:
oil_style

where you can see that the bottom of the image its still normal.

Please make compatible library!

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!

java.lang.UnsatisfiedLinkError: Issues

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)

filters leave a small border around an image untouched

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.

gradle build and aar packaging

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

New NDK

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.

Couldn't load AndroidImageFilter

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

Unexpected stop on the demo

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:

  1. Select the LOMO effect in the items menu to apply the LOMO effect. The code goes all the way to the line:47 in cn.Ragnarok.LomoFilter.changeToLomo, which calls NativeFilterFunc.lomoAddBlckRound to get int[] resultPixels. Then, suddenly the demo app stops to cease. The logcat outputs 2 msg:
  • E/dalvikvm(31965): VM aborting
  • A/libc(31965): Fatal signal 6 (SIGABRT) at 0x00007cdd (code=-6), thread 31965 (imagefilterdemo)
  1. This time, try the Relief effect. The code goes untill the line:24 in cn.Ragnarok.ReliefFilter.changeToRelief, which calls Bitmap.createBitmap to get Bitmap returnBitmap. The logcat outputs:
  • E/AndroidRuntime(324): FATAL EXCEPTION: main
  • E/AndroidRuntime(324): Process: com.example.androidimagefilterdemo, PID: 324
  • E/AndroidRuntime(324): java.lang.OutOfMemoryError
  • E/AndroidRuntime(324): at android.graphics.Bitmap.nativeCreate(Native Method)
  • E/AndroidRuntime(324): at android.graphics.Bitmap.createBitmap(Bitmap.java:882)
  • E/AndroidRuntime(324): at android.graphics.Bitmap.createBitmap(Bitmap.java:906)
  • E/AndroidRuntime(324): at cn.Ragnarok.ReliefFilter.changeToRelief(ReliefFilter.java:24)
  • E/AndroidRuntime(324): at cn.Ragnarok.BitmapFilter.changeStyle(BitmapFilter.java:42)
  • E/AndroidRuntime(324): at com.example.androidimagefilterdemo.MainActivity.applyStyle(MainActivity.java:322)
  • E/AndroidRuntime(324): at com.example.androidimagefilterdemo.MainActivity.onItemClick(MainActivity.java:266)
  • E/AndroidRuntime(324): at android.widget.AdapterView.performItemClick(AdapterView.java:299)
  • E/AndroidRuntime(324): at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
  • E/AndroidRuntime(324): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2904)
  • E/AndroidRuntime(324): at android.widget.AbsListView$3.run(AbsListView.java:3638)
  • E/AndroidRuntime(324): at android.os.Handler.handleCallback(Handler.java:733)
  • E/AndroidRuntime(324): at android.os.Handler.dispatchMessage(Handler.java:95)
  • E/AndroidRuntime(324): at android.os.Looper.loop(Looper.java:212)
  • E/AndroidRuntime(324): at android.app.ActivityThread.main(ActivityThread.java:5151)
  • E/AndroidRuntime(324): at java.lang.reflect.Method.invokeNative(Native Method)
  • E/AndroidRuntime(324): at java.lang.reflect.Method.invoke(Method.java:515)
  • E/AndroidRuntime(324): at com.android.internal.os.ZygoteInit$MinvitigethodAndArgsCaller.run(ZygoteInit.java:878)
  • E/AndroidRuntime(324): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
  • E/AndroidRuntime(324): at dalvik.system.NativeStart.main(Native Method)

Could the memory cause this issue ?
What could the root cause ?

Thank you

not restore image in to gallery

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

About 'android-image-filter' can't show the image

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.

Getting java.lang.OutOfMemoryError

Hi there,

Two things I would like to understand -

  1. After following the instructions (clean and building project),

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.

  1. Is it possible to save the bitmap with the filter (that are being shown at the ImageView)? and if so how can it be done?

nit find any solution of it

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''

UnsatisfiedLinkError on some devices

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.

Does this library support Bilateral Filter?

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?

How can I apply this to live camera screen

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

Alpha channel change to black in Gaussian Blur

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?

Using SOFT_GLOW crashes app

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

java.lang.UnsatisfiedLinkError: No implementation found

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.