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

Update Module.js #1091

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/modules/ColorTemperature/Module.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ module.exports = function ColorTemperature(options, UI) {
for (let i = 0; i < pixels.shape[0]; i++) {
for (let j = 0; j < pixels.shape[1]; j++) {

r_data = pixels.get(i, j, 0);
var r_data = pixels.get(i, j, 0);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the is a comma at the end so that the var can be shared with the other variable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, @aashna27 , could you please elaborate?

r_new_data = (255 / r) * r_data;
pixels.set(i, j, 0, r_new_data);

g_data = pixels.get(i, j, 1);
var g_data = pixels.get(i, j, 1);
g_new_data = (255 / g) * g_data;
pixels.set(i, j, 1, g_new_data);

b_data = pixels.get(i, j, 2);
var b_data = pixels.get(i, j, 2);
b_new_data = (255 / b) * b_data;
pixels.set(i, j, 2, b_new_data);
}
Expand Down Expand Up @@ -78,4 +78,4 @@ module.exports = function ColorTemperature(options, UI) {
UI: UI
};

};
};