Skip to content

Add options to save PNG and SVG snapshots at markers, override image dimensions, transparent background#103

Open
benw wants to merge 12 commits into
asciinema:mainfrom
benw:main
Open

Add options to save PNG and SVG snapshots at markers, override image dimensions, transparent background#103
benw wants to merge 12 commits into
asciinema:mainfrom
benw:main

Conversation

@benw
Copy link
Copy Markdown

@benw benw commented Nov 12, 2025

Hi Marcin,

Thanks for this great tool! I'm using it to make slides for video, so I've added a few options:

  • --mode snapshot-markers writes a PNG, SVG and .txt snapshot for each marker in the input, named according to the marker label.
  • --width and --height override the output image dimensions.
  • --transparent-background to... y'know.

This PR is intended to be easiest to review commit-by-commit. Please feel very welcome to decline this! Or ask for changes etc, feedback welcome. Thanks,

Ben.

Comment thread src/lib.rs
.theme
.or_else(|| header.term_theme.map(Theme::Embedded))
.clone()
.or_else(|| header.term_theme.clone().map(Theme::Embedded))
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clones are needed because this is now accessing config and header through shared refs, previously it moved out of them.

@benw benw changed the title Add options to save png snapshots at markers, and override image dimensions Add options to save png snapshots at markers, override image dimensions, transparent background Nov 12, 2025
@benw benw changed the title Add options to save png snapshots at markers, override image dimensions, transparent background Add options to save snapshots at markers, override image dimensions, transparent background Dec 3, 2025
@benw benw changed the title Add options to save snapshots at markers, override image dimensions, transparent background Add options to save PNG and SVG snapshots at markers, override image dimensions, transparent background Dec 3, 2025
@ku1ik ku1ik mentioned this pull request May 28, 2026
@ku1ik
Copy link
Copy Markdown
Contributor

ku1ik commented May 28, 2026

Hey @benw,

Thanks for the PR.

I believe it's best to decouple frame selection from output format, and I've been thinking about how to tackle this for a while. I've been looking for a good generic and flexible solution for frame selection (#111 also attempted this), and I believe I found something that should work well: #116 - let me know what you think.

Alternative output formats is definitely something I want to support, and that's something like to include in the following release (while the next one - 1.9 - will be about frame selection only I think). I have some ideas for this, will share soon.

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