Skip to content

Use simplified GIF interface#120

Merged
pawaskar-shreya merged 2 commits into
mainfrom
mwd-simplify-gif
Sep 12, 2025
Merged

Use simplified GIF interface#120
pawaskar-shreya merged 2 commits into
mainfrom
mwd-simplify-gif

Conversation

@mdales
Copy link
Copy Markdown
Collaborator

@mdales mdales commented Sep 11, 2025

This PR does three things:

  1. I simplified the API on giflib to prevent users having to do the LZW compression themselves, and this PR changes Claudius to use that thus keeping Claudius code more clean.
  2. In reading the GIFlib code I realise that GIFlib will pad the ColorTable.t to the nearest power of two, which Claudius was also doing, and so again I opted to simplify the Claudius code. What we did before wasn't wrong, but just might as well not have two things trying to do the same thing.
  3. In reading the GIFlib code I realise that we should set the GIF image delay time value to match the Cladius frame rate as best we can - before animations looked a little slow when viewed, and this is why.

@pawaskar-shreya
Copy link
Copy Markdown
Collaborator

In reading the GIFlib code I realise that GIFlib will pad the ColorTable.t to the nearest power of two

Yeaa, we had abstracted this piece of code from both the animation.ml and screenshot.ml during the screenshot feature to utils.ml

In reading the GIFlib code I realise that we should set the GIF image delay time value to match the Cladius frame rate as best we can - before animations looked a little slow when viewed, and this is why.

Yeaaaa, I had noticed this tooo! But couldn't really figure out the reason as to why that was happening. Now I can understnad the why behind it!

@pawaskar-shreya pawaskar-shreya merged commit 5c24ee3 into main Sep 12, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants