> For the complete documentation index, see [llms.txt](https://philm.gitbook.io/philm-ios-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://philm.gitbook.io/philm-ios-wiki/mei-zhou-yue-du/cvpixelbuffercreate-shi-yong-de-keng.md).

# CVPixelBufferCreate使用的坑

```
CVReturn status = CVPixelBufferCreate(kCFAllocatorDefault, imageSize.width,
                                      imageSize.height, kCVPixelFormatType_32ARGB, (__bridge CFDictionaryRef) options,
                                      &pxbuffer);
```

这个方法在使用的时候 一定要保存图片数据的宽度是16的整倍数,否则显示出的图片会变形

[参考](http://code.i-harness.com/zh-CN/q/39168b)
