Skip to content

AlbanSagouis/stopmotion

Repository files navigation

stopmotion

Project Status: Active – The project has reached a stable, usable state and is being actively developed. R-CMD-check [Code Coverage: 99%]

A pipeline-friendly toolkit for assembling and editing stop motion animations from sequences of still images. stopmotion wraps the magick package and adds frame-level control that plain magick pipelines lack: every function accepts a frames argument so that any operation can target a precise subset of frames.

Installation

Install the released version from CRAN:

install.packages("stopmotion")

Or install the development version from GitHub:

remotes::install_github(
    repo = "AlbanSagouis/stopmotion@dev",
    build_manual = TRUE,
    build_vignettes = TRUE
)

Overview

Family Functions
Load read()
Restructure duplicate(), splice(), arrange()
Transform rotate(), wiggle(), flip(), flop(), blur(), scale(), crop(), trim(), border(), background(), centre()
Display montage(), preview()

Quick start

library(stopmotion)

# Load all PNG frames from a folder (sorted lexicographically — name files
# frame_001.png, frame_002.png, … to guarantee frame order).
images <- read(dir = "path/to/frames/")

# Inspect all frames side-by-side.
montage(images)

# Duplicate frames 3–4 to slow down a moment.
duplicate(images, frames = 3:4, style = "looped") |>

    # Rotate every frame 2° to the right.
    rotate(degrees = 2) |>

    # Flip only frame 5 vertically.
    flip(frames = 5) |>

    # Export as an animated GIF at 10 fps.
    preview(fps = 10)

After each operation stopmotion prints a message listing the updated frame sequence in interactive sessions. Use stopmotion_verbosity(FALSE) to silence these messages, or add options(stopmotion.verbose = FALSE) to your .Rprofile.

License

MIT © Alban Sagouis

About

R package to edit stop motion animations

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages