Problem with latest commit! #122

Closed
confile opened this Issue Nov 13, 2013 · 11 comments

Projects

None yet

3 participants

@confile
confile commented Nov 13, 2013

@meltingice There seems to be a bug in the latest comment from today 2013-11-13. I use the lomo filter as:

     var filterName = "lomo";
                Caman($originalCanvas[0], function () {

                    // If such an effect exists, use it
                    if ( filterName in this) {
                        this[filterName]();

                        this.render();
                    }
                }); 

It worked perfect in the old version but after the latest commit I get strange results when aplying filters like lomo. See the following image:

michael_gorski_-_buddy is

@bebraw
Contributor
bebraw commented Nov 13, 2013

Can you post an image of what it should look like?

@confile
confile commented Nov 13, 2013

@bebraw sure here is the image how it should look like processed with the previous version of camen.full.pack.js:

michael_gorski_-_buddy is-2

You see that the black area is strange. Since everything is unchanged on my side it must be in the lib.

@bebraw
Contributor
bebraw commented Nov 13, 2013

It's hard to see how the curve work could cause that. Could it be due to the vignette option? Perhaps some option is on now by default that was off earlier?

@bebraw
Contributor
bebraw commented Nov 13, 2013

Okay, I think I know what is the likely culprit. It's those lowBound and highBound parameters of bezier. lomo uses vignette but doesn't provide values for those. As a result they will be treated as undefined. This in turn makes the generated curve contain a bunch of zeros which in turn causes the image you see.

@bebraw
Contributor
bebraw commented Nov 13, 2013

@confile I made a tentative fix. Could you check out the build of my branch to see whether it works?

@confile
confile commented Nov 13, 2013

@bebraw I tested it but did not work.

@bebraw
Contributor
bebraw commented Nov 13, 2013

Ok. Something else going on then. I'll need to set up a test case for this and repro.

@meltingice meltingice added a commit that closed this issue Nov 13, 2013
@meltingice Fixes #122 222940e
@meltingice
Owner

You were right that the lowBound and highBound variables were causing issues. The RGB color space is represented between 0 and 255, so I have set those at the default values. Let me know if you're still having issues.

@bebraw
Contributor
bebraw commented Nov 13, 2013

Yeah. Makes sense. Thanks! :)

@confile
confile commented Nov 13, 2013

okay now it is working! Thanks!

@bebraw
Contributor
bebraw commented Nov 14, 2013

@meltingice It just came to my mind you mind want to perform the same fix for hermite. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment