Why does my movie from UIImages gets distorted?

avfoundation, export, iphone, objective-c, uiimage

Solution

After a lot of experiments with different image sizes, and with the help of this article, I've got to the conclusion that the width of the images must be a multiple of 16.

Problem

I'm using zoul's solution to export UIImage array as a movie. But my frames all turns out distorted. Here's the original image: Here's a similar distortion example: I've read here that it has something to do with aspect ratio, but there's no explanation on how to fix it.

Original source

Related problems