Improve animint2pages by automatically taking screenshot of the animint
As a part of GSoC 2024 one of my task is to improve animint2pages function by automatically taking screenshot of the animint. Automatic screenshot will automate the manual step of taking a screenshot for the Github pages gallery.
related to #115 -- often you want a screenshot of the viz after the ggplots have been arranged in a certain way on the page -- with current code this is done interactively (resize % zoom / window height/width) but would be nice to have the ggplot layout defined in code and then guaranteed at render time (no need for interactive resizing)
crop white space https://imagemagick.org/Usage/crop/ R bindings https://cran.r-project.org/package=magick
this seems to be working, for example
animint2pages(viz, "figure-binseg-cv-most-frequently-selected", chromote_sleep_seconds=5)
from https://github.com/tdhock/binseg-model-selection/blob/main/figure-cv-interactive/figure-most-frequently-selected.R produced https://github.com/tdhock/figure-binseg-cv-most-frequently-selected/blob/gh-pages/Capture.PNG