[Ffmpeg-devel] attribute_deprecated img_convert

Michel Bardiaux mbardiaux
Wed Mar 21 10:48:50 CET 2007


Vlad GURDIGA wrote:
> On 21/03/07, Michael Niedermayer <michaelni at gmx.at> wrote:
>> Hi
>>
>> On Tue, Mar 20, 2007 at 11:55:36PM +0200, Vlad GURDIGA wrote:
>> > Hello,
>> >
>> > In avcodec.h somewhere arround line 2570 the function img_convert() is
>> > declared as deprecated (this is what attribute_deprecated in front of
>> > it means, I guess). What should I use instead to get a MJPEG
>> > representation of a frame?
>>
>> you should use sws_scale() instead of img_convert()
>>
>> and of course neither is related to mjpeg
> 
> I guess I made a wrong start. :) I'm trying to use ffmpeg API from C#
> to make thumbnails for videoclips in a web application. I've managed
> to save a frame to a PPM file, but I need it as a JPEG image. After
> calling img_convert(), I got an AVPicture structure. In the data[0]
> field of AVPicture I have the binary RGB data. Is there any function
> to convert that RGB data to JPEG so I could save it to disk?

That's not 'convert', that's 'encode'. img_convert *never* was for 
producing JPEG images.

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list