pixpark / gpupixel

Real-time image and video processing library similar to GPUImage, with built-in beauty filters, achieving commercial-grade beauty effects. Written in C++11 and based on OpenGL/ES.

Home Page:https://gpupixel.pixpark.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]如何获取拍照的截图呢

scp-238 opened this issue · comments

iOS 使用 captureAProcessedFrameData这个函数返回的是个什么结果呢?如何转换成图片
安卓调用这个api,目前会发生崩溃

最近会复现修复一下,如果已解决欢迎PR

背景:相机数据给 sdk 传参是使用的这个方法
gpuPixelRawInput->uploadBytes(pixels, width, height, stride);

问题:使用过程中发现,相机的sessionPreset只能传AVCaptureSessionPreset1280x720,传AVCaptureSessionPresetPhoto会导致瘦脸和大眼失去效果,是否是因为代码内部做了处理,导致其他的清晰度不生效?

不知道问题是否出在这个判断?
if (!_framebuffer || (_framebuffer->getWidth() != stride ||
_framebuffer->getHeight() != height)) {
_framebuffer =
GPUPixelContext::getInstance()->getFramebufferCache()->fetchFramebuffer(
stride, height);
}

目前我是通过 view 截图的方式实现的拍照效果,感觉sdk 如果能抛出图像信息会更好一点。

有开发想找你合作,微信多少呢?

Google 一下 GLSurfaceView 截图, 就能 做到了.