Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

AVAsset.Image

Returns an image for the asset at or near a specified time.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
AVAsset 5.2 Yes No Yes, macOS only No Yes

MBS( "AVAsset.Image"; Asset; Time { ; ImageType; Filename; Width; Height } )

Parameters

Parameter Description Example value
Asset The reference number of the asset. Please use AVAsset.OpenContainer, AVAsset.OpenFile or AVAsset.OpenURL function to get asset reference. $asset
Time The position in the video in seconds. 5
ImageType Optional
The type of image to return. Either JPEG, PNG, GIF or BMP. Default is JPEG.
"JPEG"
Filename Optional
The filename to use for the picture. Default is "image" with the extension matching the image type.
"test.jpg"
Width Optional
The maximum width to use.
500
Height Optional
The maximum height to use.
500

Result

Returns container value with image or error.

Description

Returns an image for the asset at or near a specified time.
The time may not exactly be possible, so a nearby frame may be picked.
You can call AVAsset.RequestImageTimePrecision before to request exact timings for images. Query AVAsset.ImageActualTime function to see which time the image was created from.

Examples

Queries image at 5 seconds:

MBS( "AVAsset.Image"; $asset; 5; "jpeg"; "preview.jpg")

See also

Example Databases


AVAsset.HasProtectedContent   -   AVAsset.ImageActualTime

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins