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

Output Specific Frame of Animation #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amiantos
Copy link

@amiantos amiantos commented Jan 5, 2021

  • Adds frame option to output single specific frame.
await renderLottie({
  path: 'fixtures/bodymovin.json',
  output: 'preview.jpg',
  frame: 12,
})

I'm sure there's some cleanup that can be done here to better integrate it into the architecture of this package, but as far as rough working draft that gets the job done, this works for me.

Fixes #40

@amiantos
Copy link
Author

amiantos commented Jan 5, 2021

After I opened this PR, I saw this other PR trying to do the same thing: #44

I thought their solution looked more flexible since it can be used for video files, but after testing it out, it doesn't seem to work. At least I couldn't get a test to pass.

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.

How to render a specific frame?
1 participant