Solve It
In this example we are going to reset the red value of each pixel to 255, the highest value. We will not change anything about the blue or green values.
Code It
// set red
var bb = new SimpleImage("duke_blue_devil.png");
for (var pp of bb.values()) {
pp.setRed(255);
}
print(bb);
See It
Available Images

duke_blue_devil.png
[397x337]
Drop your images onto the area above to make it available within your code editor on this page. Note: your images will not be uploaded anywhere, they will stay on your computer.
