Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seekToFrameAndGet with subsampling returns blank bitmap #797

Closed
crowbarsolutions opened this issue Jun 5, 2022 · 1 comment · Fixed by #799
Closed

seekToFrameAndGet with subsampling returns blank bitmap #797

crowbarsolutions opened this issue Jun 5, 2022 · 1 comment · Fixed by #799
Labels

Comments

@crowbarsolutions
Copy link

crowbarsolutions commented Jun 5, 2022

Using version 1.2.24

GifDrawableBuilder builder = new GifDrawableBuilder();
builder.sampleSize(2);
builder.from(methodThatReturnsBufferedInputStream());       
GifDrawable gifFromBytes = builder.build();
Bitmap bs = gifFromBytes.seekToFrameAndGet(0);
gifFromBytes.recycle();

The resulting bitmap is blank (all black) when I use sampleSize with any parameter greater than 1. With sampleSize set to 1 I am getting the correct bitmap. I am using this GIF to test with: https://crowbarsolutions.com/test/content/test.gif

This issue doesn't happen when using version 1.2.19 but happens when you use any version after that.

@crowbarsolutions crowbarsolutions changed the title seekToFrameAndGet with subsampling returns blanks bitmap seekToFrameAndGet with subsampling returns blank bitmap Jun 5, 2022
@koral-- koral-- added the bug label Jun 6, 2022
@koral--
Copy link
Owner

koral-- commented Jun 25, 2022

Thanks for the report, I was able to reproduce that.
It seems that subsampling gets broken at all.
Will try to fix it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants