Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nil when filtering image #11

Open
jvicjvic opened this issue Jul 26, 2019 · 1 comment
Open

Nil when filtering image #11

jvicjvic opened this issue Jul 26, 2019 · 1 comment

Comments

@jvicjvic
Copy link

jvicjvic commented Jul 26, 2019

When filtering an image, instead of a live stream, I'm getting nil. Any ideas on what could be happening? Here's the code:

GPUImagePicture *stillImageSource = [[GPUImagePicture alloc] initWithImage:img];
GPUImageBeautifyFilter * filter = [[GPUImageBeautifyFilter alloc] init];

[stillImageSource addTarget:filter];
[filter useNextFrameForImageCapture];
[stillImageSource processImage];
   
UIImage * result = [filter imageFromCurrentFramebuffer];  // nil

I've also tried using [filter imageByFilteringImage:img], but it's the same.

@YBYHunter
Copy link

UIImage 和 Framebuffer的编码格式不同,不能这么直接转换。
在多试试其他的方法。
UIImage and Framebuffer have different encoding formats and cannot be converted directly.
Try other methods more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants