开发者

Flex - Copying a Single frame from a Video

开发者 https://www.devze.com 2023-01-20 23:40 出处:网络
I\'m working with video in Flex开发者_开发问答. I\'d like to be able to pause the video at a certain point and copy the displayed frame as an image, and save it to a database. I\'m wondering if anybod

I'm working with video in Flex开发者_开发问答. I'd like to be able to pause the video at a certain point and copy the displayed frame as an image, and save it to a database. I'm wondering if anybody knows how I might copy a single frame from a paused video? Thanks --Matt


Assuming your video is called 'clip'

var frameGrab:BitmapData = new BitmapData( clip.width, clip.height, false, 0x000000);
frameGrab.draw(clip); // < the .draw() method will copy the frame from your video.

// Add to the stage...
var frame:Bitmap = new Bitmap(frameGrab);
addChild(frame);
0

精彩评论

暂无评论...
验证码 换一张
取 消