Hello there,<br><br>Currently, I'm working on a Qt-based class to export arrays of images as movie<br>clips. The code works perfectly with almost all the extensions, except by the <br>GIF format. <br><br>This is how I usually create every frame for my animations:<br>
<br>writeVideoFrame(const QImage &image)<br>    ....<br>    RGBtoYUV420P(image.bits(), pic_dat, image.depth()/8, true, width, height);<br>    avpicture_fill((AVPicture *)picture, pic_dat, PIX_FMT_YUV420P, width, height);<br>
<br>Now, for the case of GIF animations, I already know that I have to work with the RGB<br>pixel format. I figured it out by myself after I got this message:<br><br>ERROR: gif only handles the rgb24 pixel format. Use -pix_fmt rgb24.<br>
<br>So, I started to try things like this:<br><br>writeVideoFrame(const QImage &image)<br>    ....<br>    avpicture_fill((AVPicture *)picture, image.bits(), AV_PIX_FMT_RGB24, width, height);<br><br>Unfortunatelly, the result is not the expected.<br>
<br>This is a little example of my problem. What should be one circle moving through <br>the scene, is the same animation scaled and repeated three times:<br><br><a href="http://www.maefloresta.com/tmp/test.gif">http://www.maefloresta.com/tmp/test.gif</a><br>
<br>I know my code is missing some kind of image transformation similar to RGBtoYUV420P() <br>but for the case of the GIF RGB24 pixel format. At least, that's my guess.<br><br>I really appreciate any hint from you guys. Thank you!<br>
<br>-- <br>============================<br>
  Gustav Gonzalez<br>  <a href="mailto:xtingray@gmail.com" target="_blank">xtingray@gmail.com</a><br>============================