[AC-5472] imageAsCompressed is not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Needs more info |
Resolution Date | 2018-01-03T22:03:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Mohamad Alhajj |
Assignee | Shak Hossain |
Created | 2017-12-25T12:13:05.000+0000 |
Updated | 2018-01-03T22:03:51.000+0000 |
Description
After capturing image from the camera, I displayed the following data in the console:
*Initial Image (wxh): 640 x 480*
*Initial Image Type: image/jpeg*
I tried to compress this image through imageAsCompressed function as below:
*e.media.imageAsCompressed(0.5);*
I got the following error:
[ERROR] TiBlob: (main) [11225,16243] Unable to get the thumbnail image. Unknown exception: null
[ERROR] TiBlob: java.lang.NullPointerException
[ERROR] TiBlob: at org.appcelerator.titanium.TiBlob.imageAsCompressed(TiBlob.java:801)
[ERROR] TiBlob: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
[ERROR] TiBlob: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57)
[ERROR] TiBlob: at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:43)
[ERROR] TiBlob: at org.appcelerator.kroll.runtime.v8.V8Function$1.run(V8Function.java:70)
[ERROR] TiBlob: at android.os.Handler.handleCallback(Handler.java:733)
[ERROR] TiBlob: at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR] TiBlob: at android.os.Looper.loop(Looper.java:136)
[ERROR] TiBlob: at android.app.ActivityThread.main(ActivityThread.java:5001)
[ERROR] TiBlob: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] TiBlob: at java.lang.reflect.Method.invoke(Method.java:515)
[ERROR] TiBlob: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
[ERROR] TiBlob: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
[ERROR] TiBlob: at dalvik.system.NativeStart.main(Native Method)
Documentation: https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsCompressed
Titanium SDK version: 6.3.0.GA
Tested on: Genymotion Emulator (Samsung Galaxy Note 3 - 4.4.4 - API 19 - 1080x1920)
Hello [~malhajj], Thanks for sharing with us. Please provide a full sample test code that regenerates the issue. Better to provide a sample app as an attachment here. We will test the issue in our environment. Also, provide us your detail environment information . Best