Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whether the future support to adjust the degree of filter ? #84

Open
LeeCenY opened this issue Mar 30, 2021 · 7 comments
Open

Whether the future support to adjust the degree of filter ? #84

LeeCenY opened this issue Mar 30, 2021 · 7 comments

Comments

@LeeCenY
Copy link
Contributor

LeeCenY commented Mar 30, 2021

For example, the following chart

10701617083001_ pic

@muukii
Copy link
Collaborator

muukii commented Mar 30, 2021

@LeeCenY
'degree' means filter's intensity?

@LeeCenY
Copy link
Contributor Author

LeeCenY commented Mar 31, 2021

@LeeCenY
'degree' means filter's intensity?

Yes

@muukii
Copy link
Collaborator

muukii commented Mar 31, 2021

@LeeCenY
Sorry, for now, I do not have that plan.

@LeeCenY
Copy link
Contributor Author

LeeCenY commented Mar 31, 2021

Okay, thanks a lot.

@elteclagol
Copy link

@LeeCenY you can do that with this code:

let filter = CIFilter.sourceOverCompositing()
let degree = 0.51

filter.backgroundImage = originalCIImage
filter.inputImage = filteredCIImage.applyingFilter("CIColorMatrix", parameters: [
    "inputRVector": CIVector(x: 1, y: 0, z: 0, w: 0),
    "inputGVector": CIVector(x: 0, y: 1, z: 0, w: 0),
    "inputBVector": CIVector(x: 0, y: 0, z: 1, w: 0),
    "inputAVector": CIVector(x: 0, y: 0, z: 0, w: degree),
    "inputBiasVector": CIVector(x: 0, y: 0, z: 0, w: 0)
])

@LeeCenY
Copy link
Contributor Author

LeeCenY commented Apr 1, 2021

@LeeCenY您可以使用以下代码进行操作:

let filter = CIFilter.sourceOverCompositing()
let degree = 0.51

filter.backgroundImage = originalCIImage
filter.inputImage = filteredCIImage.applyingFilter("CIColorMatrix", parameters: [
    "inputRVector": CIVector(x: 1, y: 0, z: 0, w: 0),
    "inputGVector": CIVector(x: 0, y: 1, z: 0, w: 0),
    "inputBVector": CIVector(x: 0, y: 0, z: 1, w: 0),
    "inputAVector": CIVector(x: 0, y: 0, z: 0, w: degree),
    "inputBiasVector": CIVector(x: 0, y: 0, z: 0, w: 0)
])

Thank you for the code, I'll study it

@muukii
Copy link
Collaborator

muukii commented Apr 1, 2021

Actually,
FilterColorCube
supports amount parameter.
Engine supported it, but UI does not have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants