Open jvicjvic opened 5 years ago
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.
UIImage 和 Framebuffer的编码格式不同,不能这么直接转换。 在多试试其他的方法。 UIImage and Framebuffer have different encoding formats and cannot be converted directly. Try other methods more.
When filtering an image, instead of a live stream, I'm getting nil. Any ideas on what could be happening? Here's the code:
I've also tried using [filter imageByFilteringImage:img], but it's the same.