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
| Name | Type | Requirement | Default or omission behavior |
|---|---|---|---|
path | File | required | — |
duration | Duration | optional | uses a requested Video extent from the surrounding body. Without one, the call reports a missing image duration |
fit | Keyword(cover | contain | stretch) | optional | cover |
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
covermode fills the frame and crops overflow. Thecontainmode adds padding. Thestretchmode 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.
E_MISSING_IMAGE_DURATION— Missing image durationE_INVALID_DURATION— Invalid duration