GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

Can GPUImagePicture and GPUImageFilterPipeline work together?

Open peterhwong opened this issue 14 years ago • 2 comments

Hi Brad, I've got many configuration files that I would like the user to be able to select via UI and apply the filters on an image. Here is my source:

    GPUImageView *filterView = [self.overlayDelegate previewImage];
    UIImage *image = [self.overlayDelegate getImage];
    GPUImagePicture *sourceImage = [[GPUImagePicture alloc] initWithImage:image];

    thumbDictionary = [thumbView thumbDictionary];
    presetFile = [thumbDictionary objectForKey:kScrollViewDataKey];

    pipeline = [[GPUImageFilterPipeline alloc] initWithConfigurationFile:[[NSBundle mainBundle] URLForResource:presetFile withExtension:@"plist"] input:sourceImage output:filterView];

If I run, I get this: -[UIImageView nextAvailableTextureIndex]: unrecognized selector sent to instance 0x1c582920 2012-07-10 15:28:24.175 PerfectBW[1410:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView nextAvailableTextureIndex]: unrecognized selector sent to instance 0x1c582920'

Is this legal to do?

Thanks Peter

peterhwong avatar Jul 10 '12 22:07 peterhwong

To be honest, I didn't write the GPUImageFilterPipeline class, have no idea how it works, and I think it might be broken. Can you just manually create your filter chain, or place it within a filter group?

BradLarson avatar Jul 10 '12 22:07 BradLarson

Thanks Brad, I will try using filter group instead.

peterhwong avatar Jul 10 '12 23:07 peterhwong