Skip to content

Instantly share code, notes, and snippets.

View lannybroo's full-sized avatar

Alan Brooks lannybroo

View GitHub Profile
@lannybroo
lannybroo / Image_to_Tool_Icon_24.ijm
Last active January 20, 2021 04:21
A version of the ImageJ Image to Tool Icon macro that works with 24x24 images
// This macro converts a 24x24 8-bit or 24-bit image to a tool
// macro icon string. Includes a few examples.
macro "Convert Image to Tool Icon 24..." {
requires("1.53c"); // for the extended hex feature
if (!(bitDepth==8 || bitDepth==24) || getWidth>24 || getHeight>24)
exit("This macro requires an 8-bit 24x24 image");
Dialog.create("Image 2 Tool");
Dialog.addString("Tool name", "myTool");