<div dir="ltr"><div><div>I'm writing a filter to extract a list of frames from a video and I'm having trouble saving the frame data to a image file. Is there a function that already does this? It would be something like:<br>
<br></div>save_frame_to_file(AVFrame frame, char* filename)<br><br></div>The output could be BMP or PNG. I've tried to write my own function, but so far the best I could do was to write a black and white version of the frame. It's hard to figure out how the image data is stored on the "data" field inside the AVFrame.<br>
</div>