我正在尝试让Voronoi过滤器在我的UIImage上工作,无论我做什么 - 我都无法使它工作....
这是我的代码:
GPUImageJFAVoronoiFilter *jfaVoronoiFilter = [[GPUImageJFAVoronoiFilter alloc] init];
[jfaVoronoiFilter setSizeInPixels:CGSizeMake(1024.0, 1024.0)];
GPUImagePicture *voronoiPointsPicture = [[GPUImagePicture alloc] initWithImage:[UIImage imageNamed:@"Voroni.png"]];
[voronoiPointsPicture addTarget:jfaVoronoiFilter];
GPUImageVoronoiConsumerFilter *voronoiFilter = [[GPUImageVoronoiConsumerFilter alloc] init];
[jfaVoronoiFilter setSizeInPixels:CGSizeMake(1024.0, 1024.0)];
[voronoiFilter setSizeInPixels:CGSizeMake(1024.0, 1024.0)];
[jfaVoronoiFilter addTarget:voronoiFilter];
[voronoiPointsPicture processImage];
return [jfaVoronoiFilter imageByFilteringImage:theImage];
我做错了什么?