[Libav-user] Using swcale to crop picture

Eric Beuque eric.beuque at gmail.com
Wed Feb 13 18:21:19 CET 2013


I'm using avcodec and swcale to to display a MPJEG stream in a Qt

avcodec decode image as YUV image and swscale rescale it in a RGB32 image
to fit in the windows.

I would like to provide a zoom feature, i so i am wondering if any way
exists with swscale to rescale only the selected region. For example, I got
an original YUV image as 1280x800 pixels, the destination widget is 640x480
pixels, but i want only to display the region [0,0] to [320,240].

Is swscale able to to that? I have some difficulties to understand all
variables in the documentation.

Thank for your help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130213/e2d56ab1/attachment.html>

More information about the Libav-user mailing list