I'm working on an application that creates pictures from videos but I'm facing the following problem.
I'm using the Draw method to create BitmapData from the video and I converted this it into a byteArray with the PNGEncoder.
Now I'm looking for a way to convert this byteArray into a File (that I can write with the FileReference) but I'm totally stuck.
I tried working with the filstream but this just gives me a lot of errors. Does anyone have an idea how to do this?
So what I want is creating a File object that contains the data from my ByteArray.
Thanks for helping
// really should work
var desktopFile :File = File.desktopDirectory.resolvePath('somevideo.png')
var bytez:ByteArray = PngEncoder.encode(YOURDATA);
var stream:FileStream = new FileStream();
stream.open( desktopFile , (desktopFile .exists) ?
stream.writeBytes ( bytez, 0, bytez.length );