← back to roto on ba3a.dev

RasterSequenceCacheCodec

A sequence of rasters — a clip's frames, or one mask per frame — as 000000.png, 000001.png, … Frame i is always fileName of i, and the sequence ends at the first number with no file.

Properties

Link copied to clipboard

The same names as a printf pattern, %06d.png, for a program that writes the frames itself.

Functions

Link copied to clipboard
fun fileName(index: Int): String

The file name of frame index, six digits then .png.

Link copied to clipboard
open override fun read(entry: Path): List<Raster>

Reads back what write stored in entry; throws an IOException when the content is not what it left.

Link copied to clipboard

Reads an entry one raster at a time, for the same reason.

Link copied to clipboard
open override fun write(value: List<Raster>, entry: Path)

Stores value in entry, an empty folder.

Link copied to clipboard
fun writeEach(rasters: Sequence<Raster>, entry: Path)

Writes rasters one at a time, so converting them to rasters never holds them all at once.