[FFmpeg-devel] AVPicture to file

Michael Niedermayer michaelni
Sat Oct 18 20:56:59 CEST 2008


On Thu, Oct 16, 2008 at 05:52:14PM +0200, Eduardo.Spina at ecl2009.ec-lyon.fr wrote:
> Hi,
> 
> I am learning ffmpeg, so I'd ask you not to consider me as an expert,  
> but not a dummy either.
> 
> I've been playing around with the source and I am in a situation that  
> I have an AVPicture*, so, I have access to the YUV composants of an  
> image and I'd like to write an image file out of it (bmp, jpeg, ...  
> anything easily readable).
> 
> I've seen that I could get it transformed to RGB and then write a bmp  
> file manually (writting the header and everything)... But, I think  
> there should be a better way of doing this or, at least, there should  
> be a part of this process ready for me to use somewhere.

avcodec_encode_video() will encode your AVPicture to a image format of
your choice

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081018/f2fe2020/attachment.pgp>



More information about the ffmpeg-devel mailing list