<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 19, 2018 at 8:58 AM, Pedro Pereira <span dir="ltr"><<a href="mailto:1995pedropereira@gmail.com" target="_blank">1995pedropereira@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>However I am only interested in loading an image (or a frame of a video) and apply the scaling operation.</div><div>I searched for a way to load an image to an AVFrame, apply the sws_scale and then write the resulting AVFrame to a file so I can verify the result.<br></div></div></blockquote><div><br></div><div>If you want to create a single frame and pass it to sws_scale, take a look at the scaling_video.c example.</div><div><br></div><div>You can ignore the code that opens the file and writes out frames.</div><div><br></div><div><a href="https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/scaling_video.c">https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/scaling_video.c</a></div><div><br></div></div><br></div></div>