Flex - Copying a Single frame from a Video

旧城冷巷雨未停 提交于 2019-12-11 04:44:13

问题


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


回答1:


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);


来源:https://stackoverflow.com/questions/4008555/flex-copying-a-single-frame-from-a-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!