burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.14k stars 991 forks source link

java.lang.ClassCastException (FilterImageView.getBitmap (FilterImageView.java:line no -129)) #124

Open smith121321 opened 5 years ago

smith121321 commented 5 years ago

ja.burhanrashid52.photoeditor.FilterImageView.getBitmap java.lang.ClassCastException: at ja.burhanrashid52.photoeditor.FilterImageView.getBitmap (FilterImageView.java:129) at ja.burhanrashid52.photoeditor.FilterImageView.setImageDrawable (FilterImageView.java:98) at activity.TextEditorActivity$1.onResourceReady (TextEditorActivity.java:115) at activity.TextEditorActivity$1.onResourceReady (TextEditorActivity.java:112) at com.bumptech.glide.request.SingleRequest.onResourceReady (SingleRequest.java:568) at com.bumptech.glide.request.SingleRequest.onResourceReady (SingleRequest.java:530) at com.bumptech.glide.load.engine.EngineJob.handleResultOnMainThread (EngineJob.java:218) at com.bumptech.glide.load.engine.EngineJob$MainThreadCallback.handleMessage (EngineJob.java:324) at android.os.Handler.dispatchMessage (Handler.java:98) at android.os.Looper.loop (Looper.java:154) at android.app.ActivityThread.main (ActivityThread.java:6165) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:888) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:778)

smith121321 commented 5 years ago

After I set,mPhotoEditorView.getSource().setImageDrawable(drawable); then in FilterImageView class, funtion getBitmap(), I get this error somtimes, this reports are from Playstore, in getBitmap() funtion ClassCastException: occurs, try to resolve it

burhanrashid52 commented 5 years ago

Is it happing in setting drawable only or any with any other bitmap?