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

tmxrasterizer: Added --frames and --frame-duration arguments #3868

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented Jan 9, 2024

These allow exporting animated maps as multiple numbered images, which can be combined into a GIF or other format using another tool.

The --advance-animations parameter stays for compatibility, and determines the time of the first exported frame, whereas --frame-duration determines the time between each frame.

Example usage:

tmxrasterizer desert.tmx desert.png --frames 5

The above will create the following list of images:

desert0.png
desert1.png
desert2.png
desert3.png
desert4.png

And each rendered frame will have advanced by another 100ms from the previous one (the default frame duration).

This is related to #1433, though it does not actually create a GIF (but other animation formats may be preferred anyway).

bjorn added 2 commits January 12, 2024 13:52
These allow exporting animated maps as multiple numbered images, which
can be combined into a GIF or other format using another tool.

The --advance-animations parameter stays for compatibility, and
determines the time of the first exported frame, whereas
--frame-duration determines the time between each frame.
This generally doesn't speed up the process much, since saving the PNGs
is often the slowest bit, but it could matter when rendering many frames
of huge maps.

In case of rendering a world things are more complicated, so for now the
maps are still loaded repeatedly.
@bjorn bjorn force-pushed the tmxrasterizer-animation-support branch from 7f83fc2 to 00217a3 Compare January 12, 2024 12:53
@bjorn bjorn merged commit 00217a3 into mapeditor:master Jan 12, 2024
11 of 12 checks passed
@bjorn bjorn deleted the tmxrasterizer-animation-support branch January 12, 2024 12:54
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.

1 participant