Last active
August 29, 2015 14:06
-
-
Save Gargaj/da529d2edb365c940f49 to your computer and use it in GitHub Desktop.
Color grading LUT generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int block = 32; | |
void setup() { | |
size( block * block, block ); | |
} | |
void draw() { | |
loadPixels(); | |
int scale = 256 / block; | |
for (int r=0; r<block; r++) | |
for (int g=0; g<block; g++) | |
for (int b=0; b<block; b++) | |
{ | |
pixels[ g * width + r + b * block ] = color( r * scale, g * scale, b * scale ); | |
} | |
updatePixels(); | |
} | |
void keyPressed() | |
{ | |
String fn = "LUT" + block + ".png"; | |
print("saved " + fn); | |
save(fn); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment