Open dansinclair25 opened 12 years ago
Hey Dan,
I haven't seen that issue with lookups in a chain using video, & haven't tried a chain of filters with a lookup on still images, but did come across an issue when adding an intensity/strength option to a lookup filter when using it on a still image.
Whenever the intensity value was changed, the lookup wouldn't update unless '[lookupImageSource processImage];' was called. I'm not sure if that is the proper/correct fix, but it seems to be working ok, & may be worth checking out for your issue. Although I'm not sure where that should be called in your case, but maybe as a quick test you could add a method that simply runs processImage, & call that manually whenever you change your slider, just to see if it possibly helps fix it.
Phil
I don't have any success by calling processImage, but it seems in my app I can verify that the lookup filter isn't forwarding the image output into the next filter in the chain.
Still Image (photo) -> Crop -> Group -> Blend w/ Image -> View
Everything works well when changing the group filter as long as it doesn't contain a lookup. I've spent about a full day trying to figure out what was going on here only to realize I think the problem is with the lookup filter, not my code, as every other plugin I have seems to work normally. None of those use lookup filters.
After a couple days of trying to problem solve this issue ... and two different versions of filter setup refactoring ... I came back here and thought I'd give this a shot. I use filter switching in my app and couldn't, for the life of me, get the lookup filters (namely MissEtikate and Amatorka) to update downstream filters
@phil-m you hit the nail on the head. I copied the source from the MissEtikate filter into my own, but added
-(void)prepareForImageCapture {
[lookupImageSource processImage];
[super prepareForImageCapture];
}
And it looks like I'm in the clear. It appears any filter that makes use of GPUImageLookupFilter
will need to extend prepareForImageCapture
as demonstrated above or you'll possibly run into problems.
I'll submit a pull request with the changes to GPUImageMissEtikateFilter
, GPUImageAmatorkaFilter
, and GPUImageSoftEleganceFilter
(not that it matters, but ignore the first commit reference - the pull request I attempted to make with had a bunch of changes that I didn't intend to send back through a pull request. I deleted my repo and re-cloned it for a clean pull request)
Hi,
I'm trying to add a custom Lookup Filter to a chain of other adjustable filters but when I add the custom Lookup Filter, the adjustable filters don't work.
Here's what I have to setup the filters;
and here's my custom Lookup Filter Class;
GPUImageLookupTestFilter.h
GPUImageLookupTest.m
all of which works perfectly by itself if I call
but when I add it to the chain of filters, I cannot update them using a UISlider (as per the FilterShowcase example)
Any ideas?
Thanks in advance.
Dan