Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

image

Create a Video from an image file.

Call shape

image(path: File, duration?: Duration, fit?: Keyword(cover | contain | stretch)) -> Video

This is call-shape notation for lookup, not ClipAsm declaration syntax.

Graph inputs

This program does not take a Video or Audio input from the stack.

Parameters and defaults

NameTypeRequirementDefault or omission behavior
pathFilerequired
durationDurationoptionaluses a requested Video extent from the surrounding body. Without one, the call reports a missing image duration
fitKeyword(cover | contain | stretch)optionalcover

Result and stack behavior

Outputs: Video.

Default stack access is owned. See stack binding for ownership and visibility rules.

Timeline and markers

The program creates a new timeline when it returns Video or Audio.

Example

clipasm 1

config {
    video {
        fps = 30
    }
}

image("assets/title.png", 2s, contain)

Expected validation result: Video with exactly 60 project frames at the example’s explicit fps = 30.

The reference checks parse and compile this exact example. Compilation does not inspect the named media files.

Behavior

  • ClipAsm fits the image to the project Video dimensions.
  • Untagged opaque RGB stills use the sRGB convention, and fitting interpolation runs in display-linear light.
  • The cover mode fills the frame and crops overflow. The contain mode adds padding. The stretch mode can distort the image.
  • A surrounding Video body may supply the requested duration when the author omits duration.

Requirements

  • The resolved duration must contain at least one project frame.

Common diagnostics

These are the diagnostics most specific to this program.

See also