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

Why a gif going through decode and encode will drop quality and size #6

Open
jiangyurong609 opened this issue Mar 11, 2018 · 0 comments

Comments

@jiangyurong609
Copy link

I was trying to test decode and encode a gif and compare with original input file, I found the size drops and quality drops. is encode a lossy process? Or I miss something? below is my encode code

encoder.setRepeat(0);
      encoder.setDelay(decoder.delay);
      encoder.setDispose(decoder.dispose);
      encoder.setQuality(1);
      encoder.setSize(decoder.width, decoder.height);
      for (int i = 0; i < decoder.getFrameCount(); i ++) {
        encoder.addFrame(decoder.getFrame(i));
      }

      encoder.finish();
      assertEncodedImageIsEqualTo(gif);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant