forked from jywarren/image-sequencer
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Monochrome "fallback" on Dynamic module not working #146
Labels
Comments
The contributors most likely able to help are: |
jywarren
changed the title
Monochrome fallback on Dynamic module not working
Monochrome "fallback" on Dynamic module not working
Oct 18, 2017
Lines 31-35 channels.forEach(function(channel) {
if (options.hasOwnProperty(channel))
options[channel + '_function'] = generator(options[channel]);
...
}); Shouldn't that be channels.forEach(function(channel) {
if (options.hasOwnProperty(channel) && options[channel] != "")
options[channel + '_function'] = generator(options[channel]);
...
}); Fixed it for me! |
Ahh! great. Hey, if you'd like to make that change and push it to a branch with a name beginning with Give it a try! New outreach technology :-) |
Ohh wow! That's interesting!
…On Fri, Oct 27, 2017, 00:04 Jeffrey Warren ***@***.***> wrote:
Ahh! great. Hey, if you'd like to make that change and push it to a branch
with a name beginning with first-timer-, I think our new first-timers-bot
will pick it up and make a FTO issue out of it! :-)))
Give it a try! New outreach technology :-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AT0xnLMWx1nNNP_YkgBKNdNW2-Eq0YMuks5swNDIgaJpZM4P-Vw6>
.
|
fixed in #1451 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On the new Dynamic module, you put in an expression and it runs it on every pixel for each color. But if you haven't specified anything for a channel, it runs the "monochrome" expression on it. This logic is a bit odd and seems to be causing some errors.
Input
(r-b)/(r+b)*128 + 128
or even justr
into the Dynamic module here: https://publiclab.github.io/image-sequencer/examples/#steps=dynamicAnd you get a black image. That code is here, and perhaps this line needs to be multiplied by 255?
https://github.com/publiclab/image-sequencer/blob/master/src/modules/Dynamic/Module.js#L18
Or perhaps it's something more subtle, like the R, G, and B channels evaluating to 0?
The text was updated successfully, but these errors were encountered: