← back to roto on ba3a.dev

HorizontalShift

Moves an image sideways by whole pixels, keeping its size: what was at x lands at x + dx, and what moves in from beyond the edge is empty. Whole pixels only, so stabilising never resamples or blurs a frame.

Functions

Link copied to clipboard
fun shift(mask: Mask, dx: Int): Mask

mask moved dx pixels right, left when negative.

fun shift(raster: Raster, dx: Int): Raster

raster moved dx pixels right, left when negative.