Skip to content

Instantly share code, notes, and snippets.

@rinze
Last active December 20, 2015 18:08
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 rinze/6173144 to your computer and use it in GitHub Desktop.
Save rinze/6173144 to your computer and use it in GitHub Desktop.
ImageJ macro for generating de Mariano Rajoy hybrid image at http://www.flickr.com/photos/rinzewind/9458528864/.
open("C:\\temp\\barcenas.tif");
run("32-bit");
run("Mean...", "radius=30");
open("C:\\temp\\mariano.tif");
run("32-bit");
run("Duplicate...", "title=mariano-1.tif");
run("Mean...", "radius=20");
imageCalculator("Subtract create 32-bit", "mariano.tif","mariano-1.tif");
imageCalculator("Add create 32-bit", "Result of mariano.tif","barcenas.tif");
selectWindow("barcenas.tif");
close();
selectWindow("mariano.tif");
close();
selectWindow("mariano-1.tif");
close();
selectWindow("Result of mariano.tif");
close();
selectWindow("Result of Result of mariano.tif");
makeRectangle(504, 72, 1600, 2132);
run("Copy");
run("Internal Clipboard");
run("Out [-]");
selectWindow("Result of Result of mariano.tif");
close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment