Giter Club home page Giter Club logo

Comments (13)

dmitric avatar dmitric commented on August 24, 2024

ACVs allow you to play around in Photoshop and are more useful than those lookup filters. If you don't like using ACVs or are unsure how to create them, you can just change the code the work with lookups because this project is open source. I'm not doing anything with them here.

from dlcimagepickercontroller.

dpestana avatar dpestana commented on August 24, 2024

Hi @alexperri7. Use the GPUImageRGBFilter just as a is for FilterGroup purposes so you can override the problem. This doesn't affect your original filter (in this case Amatorka). Here is my code to help you:

case 4: {
    filter = [[GPUImageFilterGroup alloc] init];

    GPUImageAmatorkaFilter *amatorkaFilter = [[GPUImageAmatorkaFilter alloc] init];
    [(GPUImageFilterGroup *)filter addFilter:amatorkaFilter];

    GPUImageRGBFilter *rgbFilter = [[GPUImageRGBFilter alloc] init];
    [(GPUImageFilterGroup *)filter addFilter:rgbFilter];

    [amatorkaFilter addTarget:rgbFilter];

    [(GPUImageFilterGroup *)filter setInitialFilters:[NSArray arrayWithObject:amatorkaFilter]];
    [(GPUImageFilterGroup *)filter setTerminalFilter:rgbFilter];
} break;

If you get memory issues, make your photocapturebutton your FirstResponder under viewDidAppear. Hope it helps.

from dlcimagepickercontroller.

dmitric avatar dmitric commented on August 24, 2024

Interested to know how the first responder helps with low memory

from dlcimagepickercontroller.

dpestana avatar dpestana commented on August 24, 2024

@dmitric Actually the error I got was "wait_fences: failed to receive reply: 10004003", which I presume is related to memory issues, in my still learning stage of Objective-C, so I went to Instruments and it seems the photocapturebutton was causing it.

from dlcimagepickercontroller.

dmitric avatar dmitric commented on August 24, 2024

@dpestana nope it has to do with animations occurring when not on screen.

from dlcimagepickercontroller.

luosky avatar luosky commented on August 24, 2024

@dpestana Thanks for your code. It works great. But if I have the group filters on with live preview and then toggle blur, the screen turn out to be black. It works with static image, but seems filterGroup can't work with blur filter quite good on live preview.

btw, I reproduced it on 4S and iPod Touch 5 with iOS 6. Looks like it is a common problem.

from dlcimagepickercontroller.

dpestana avatar dpestana commented on August 24, 2024

@dmitric Thanks for the tip once again. Never would have figured out that one. @luosky , glad I could help. Indeed, I also have problems with the blur filter, so I removed it untilI figure out a way to improve it or eventually use a vignette instead of blur. If you by any chances know how to use the GPUImageOverlayBlendFilter in a FilterGroup please share it. I can't seem to understand how to use the blend filters.

EDITED: Nevermind. I got the Blend Filters to work.

from dlcimagepickercontroller.

alexperri7 avatar alexperri7 commented on August 24, 2024

@dpestana thanks for the help! I too am having the issue with the blur (that's what my original question was about). If I choose one of those lookup filters, it applies it to the image properly but the second I do a blur over that filter, the image goes black. I'd really like to know how to use them together.

from dlcimagepickercontroller.

riegie avatar riegie commented on August 24, 2024

@luosky @dpestana @alexperri7 I'm also having this problem. My images also turn out black once applying a blur over the filtered image. I find it a lot easier to create lookup filters with much better results, so hopefully someone can tell us how this works.

from dlcimagepickercontroller.

dpestana avatar dpestana commented on August 24, 2024

Hi everyone. I'm not using the Blur Filter. I removed it. But I'm trying to implement the same thing using a vignette. If I'm able to make it work I'll let you know.

from dlcimagepickercontroller.

alexperri7 avatar alexperri7 commented on August 24, 2024

@dpestana Having any luck? I'm still trying with the blur over here but not having much luck. I'm able to apply a lookup filter, but when I toggle the blur on is when the trouble starts. First, the blur turns on and the image goes black, but after tapping on the filter again both the filter and the blur are working. The same thing happens when turning the blur off. Image goes black and upon tapping the filter again the image reappears with only the filter on.

from dlcimagepickercontroller.

dpestana avatar dpestana commented on August 24, 2024

Hi @alexperri7 I haven't tried the blur. I removed all the code for blur, it's not an effect I want the users to take control. Instead I'm going to try Vignette and Borders. I believe the problem might be related to the Blur effect, because I used it on one of my custom group filters (in a chain of filters) and although I can see the blur on the live preview, when I take the picture the blur just vanishes. It might also be related to the order of the filters. I'm targeting the blur just like you, as the last effect on the chain, so maybe it will work by placing it on another place of the chain. I still have no idea, because I really haven't been giving that top priority.

from dlcimagepickercontroller.

dpestana avatar dpestana commented on August 24, 2024

Hi @alexperri7 . I have now tried to use the Blur and I had exactly the same problem you did and some other problems too. It seems that when you toggle the Blur all targets are removed. Meaning, there must be a string like [self removeAllTargets] which is not properly placed. I gave up using the Blur because it doesn't work with 2448 * 2448 photos. It only works great on 640 * 640 photos. Every other size crashes (at least with me). I tried the new code @dmitric posted and the Blur works great with his code, but with @dmitric code I can't take full resolution pictures, and that's very important for what I'm doing. Hope it helped. Best.

from dlcimagepickercontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.