Skip to content

Instantly share code, notes, and snippets.

@mutterer
Last active February 12, 2021 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mutterer/0c4c158a9b660cb457cacccfbb0cbb88 to your computer and use it in GitHub Desktop.
Save mutterer/0c4c158a9b660cb457cacccfbb0cbb88 to your computer and use it in GitHub Desktop.
A macro that splits RGB images and colors produced windows
// better split RGB image.
// @egrandgirard1 & @jmutterer
if (bitDepth==24) {
run("Duplicate...","title="+getTitle);
run("Split Channels");
id=getImageID;
cols=newArray("#8888ff","#88ff88","#ff8888");
for(i=0;i<3;i++) {
selectImage(id+i);
//run("8-bit");
eval('js','IJ.getImage().getWindow().setBackground(Colors.decode("'+cols[i]+'"))');
}
run("Tile");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment