android-ndk-gif icon indicating copy to clipboard operation
android-ndk-gif copied to clipboard

Not working with image files.

Open ankitbatra11 opened this issue 9 years ago • 5 comments

Hi,

I tried using the lib but it does not seem to work. I am decoding bitmap from image files using Glide and BitmapFactory methods but nothing seems to work. I am making sure that the bitmap config is ARGB_8888, by passing in Bitmap.Options to BitmapFactory and specifying format explicitly for Glide.

This lib is quite fast and I really hope to use it. Please let me know if you need more info to debug the issue.

-Ankit

ankitbatra11 avatar Jul 14 '16 18:07 ankitbatra11

Attaching screenshot of encoded gif:

screenshot_20160715-000345

ankitbatra11 avatar Jul 14 '16 18:07 ankitbatra11

Could you attach original .GIF file? please.

waynejo avatar Jul 17 '16 14:07 waynejo

There you go!

temp

ankitbatra11 avatar Jul 17 '16 17:07 ankitbatra11

I tried fix your image. After some try, I found your image is 709x30? (maybe 300 or 301.) But your result gif is 360x592. I think you give wrong size when init encoder. I attached original image what you encoded.

Could you recheck your code? Please. If you did collect way, give me original image files and sample code. Please.

original

waynejo avatar Jul 18 '16 18:07 waynejo

Thanks for pointing it out. Indeed I was using the wrong size. I corrected that up and it's working all fine now. I tried it out with 2 images and it worked fine.

However, it is crashing if I select a relatively larger number of images for e.g. 9 (in my case). I am getting following error which leads the app to crash: A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x94e8d000 in tid 26231 (pool-5-thread-1)

ankitbatra11 avatar Jul 26 '16 20:07 ankitbatra11