Image
Image layer configuration
The config
argument supports the following layer configuration properties:
Unlike an audio or video file, images have no inherent duration
. Therefore, Image layers default to having the full duration
of the overall composition.
If you want to reduce the duration
of your Image Layer, use the Trim layer configuration.
Examples
Minimal
await composition.addImage(
"https://editframe.com/docs/composition/layers/image/cyber-feathers.jpg"
);
Full layer configuration
await composition.addImage(
// file
"https://editframe.com/docs/composition/layers/image/cyber-feathers.jpg",
// config
{
position: {
x: "center",
y: "center",
},
size: {
height: 500,
width: 1000,
},
timeline: {
start: 1,
},
trim: {
start: 0,
end: 5,
},
}
);