Flex - 从视频复制单个帧 [英] Flex - Copying a Single frame from a Video

查看:251
本文介绍了Flex - 从视频复制单个帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Flex中的视频。我想能够在某个点暂停视频,并将显示的帧复制为图像,并将其保存到数据库。我想知道是否有人知道我如何从暂停的视频复制单个帧?
感谢
--Matt

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

这篇关于Flex - 从视频复制单个帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆