I am using an AVAssetWriter to encode a series of images to a movie file, following Zoul\'s answer here: How do I export UIImage array as a movie?.
In short my proc
Old thread but different answer, instead of multiplying by a number I use CVPixelBufferGetBytesPerRow to get the actual bytes per row for CGBitmapContextCreate and it fixed the distortion, leaving height/width the same