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

Methods to apply color channels #3

Open
Ignotus-mago opened this issue Jun 16, 2024 · 2 comments
Open

Methods to apply color channels #3

Ignotus-mago opened this issue Jun 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Ignotus-mago
Copy link
Owner

Much like applyAlpha() method, applyRed, applyGreen, applyBlue, applyHue, applyBrightness, applySaturation. Then call these methods from pullPixelAudio and pushAudioPixel methods. I don't think there will be much of a reduction in speed, and we'll gain clarity by having one method instead of bitwise ops scattered through code. Probably can lose a var assignment or two by calling the methods.

@Ignotus-mago
Copy link
Owner Author

I wrote eight "apply" methods: applyBrightness, applyHue, applySaturation, applyRed, applyGreeen, applyBlue, applyAlpha, applyAll. Each method accepts a float value and an int, which should be an audio value and an RGB value. The float is applied in the selected channel and returned as an RGB value.

The code that call the apply methods was simplified, as expected. This may be all we need to do.

@Ignotus-mago
Copy link
Owner Author

We have applyChannel(float, int) merhods that have simplified calls.
Perhaps further thought is needed for situations where both arguments are RGB int values.

@Ignotus-mago Ignotus-mago added enhancement New feature or request labels Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant