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

GIF encoder Bug?

Open l376571926 opened this issue 8 years ago • 18 comments

GifEncoder.EncodingType.ENCODING_TYPE_SIMPLE_FAST temp_1500950046 0672622 sticker_big

l376571926 avatar Jul 25 '17 02:07 l376571926

What's mean? need more info about this issue please.

didikeeLunaon avatar Aug 07 '17 09:08 didikeeLunaon

重新合成的GIF有重影

l376571926 avatar Aug 07 '17 09:08 l376571926

你这个重影应该是原图上出了问题,你可以先在

gifEncoder.encodeFrame(bitmap, delay);

之前将 bitmap 保存到本地查看每一帧的图片是否是正确. (并排除 gif 播放的问题,我使用的 https://github.com/koral--/android-gif-drawable 这个库播放的)

如果是正确的那么确实是一个问题,但是我使用体验来说这个参数本身并没有问题

// 你的 delay时间设置的是多少?

didikeeLunaon avatar Aug 07 '17 09:08 didikeeLunaon

我是用的Glide加载播放

l376571926 avatar Aug 07 '17 09:08 l376571926

你的delay = 0 么?

didikeeLunaon avatar Aug 07 '17 09:08 didikeeLunaon

并没有啊,我用解帧工具解包处理过后的GIF的所有帧发现都有重影

l376571926 avatar Aug 07 '17 09:08 l376571926

按照你的字面意思,我理解为原图出现问题.我想你应该检查原图.

didikeeLunaon avatar Aug 07 '17 09:08 didikeeLunaon

delay 设置的40,从原GIF中读出多少,就设置的多少,没有改

l376571926 avatar Aug 07 '17 09:08 l376571926

但是在giphy中下载的GIF又可以正常添加水印上去而不出现重影

l376571926 avatar Aug 07 '17 09:08 l376571926

I think this is a bug. It seems to happen when the transparent image is background. I will check and fix it by this weekend.

waynejo avatar Aug 15 '17 17:08 waynejo

Even though I select ENCODING_TYPE_STABLE_HIGH_MEMORY, the quality is so bad. I want to make High-Quality GIF.

ajaystha005 avatar Aug 16 '17 01:08 ajaystha005

I am getting this error while encoding and keep on crashing if I use setDither(true); Fatal signal 7 (SIGBUS), code 2, fault addr 0x9ae0c000 in tid 16393 (RxIoScheduler-2)

The output is terrible with low quality. its GIF but it's not animated. Please check the screenshot test

ajaystha005 avatar Aug 16 '17 01:08 ajaystha005

It looks like you're using an incorrectly sized image. To reproduce bug, Can you share original image PNG sequence files?

waynejo avatar Aug 16 '17 17:08 waynejo

What is the correct size image? My image size is 300 X 300. I used this gifEncoder.init(200, 200, file, GifEncoder.EncodingType.ENCODING_TYPE_STABLE_HIGH_MEMORY);

What I need to do to generate high quality gif?

ajaystha005 avatar Aug 16 '17 19:08 ajaystha005

The initial size and the size of the images must be the same. If you init to 200x200, 200x200 image should be inserted.

waynejo avatar Aug 16 '17 21:08 waynejo

It's working now. Thank you. But the quality is still not good. This is really fast than AnimatedGifEncoder

On Wed, Aug 16, 2017 at 2:47 PM, Wayne Jo [email protected] wrote:

The initial size and the size of the images must be the same. If you init to 200x200, 200x200 image should be inserted.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/waynejo/android-ndk-gif/issues/15#issuecomment-322908980, or mute the thread https://github.com/notifications/unsubscribe-auth/AMnjDFMxuv9WKY5FETBBKGwwuTiGkMiEks5sY2NagaJpZM4Oh_pE .

-- Best Regards,

Ajay

Ajay Shrestha Cell Phone : 641-451-4387 Email: [email protected]

ajaystha005 avatar Aug 16 '17 22:08 ajaystha005

I fixed the transparent image problem. Would you like to use version 0.3.3?

waynejo avatar Aug 21 '17 03:08 waynejo

awesome. Thank you. let me try it

On Sun, Aug 20, 2017 at 8:16 PM, Wayne Jo [email protected] wrote:

I fixed the transparent image problem. Would you like to use version 0.3.3?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/waynejo/android-ndk-gif/issues/15#issuecomment-323637419, or mute the thread https://github.com/notifications/unsubscribe-auth/AMnjDL9FEDor0GlZUFbtHLRrHRX18vWnks5saPaggaJpZM4Oh_pE .

-- Best Regards,

Ajay

Ajay Shrestha Cell Phone : 641-451-4387 Email: [email protected]

ajaystha005 avatar Aug 21 '17 17:08 ajaystha005