Created
February 26, 2026 20:55
-
-
Save ctrueden/5ead6a1e733c270f5ea5f9a37172d14d to your computer and use it in GitHub Desktop.
Dumb fun Fiji script of the day :-)
This file contains hidden or 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
| #@ OpEnvironment ops | |
| #@output Img img | |
| #@output String ascii | |
| img = net.imglib2.display.screenimage.awt.AWTScreenImageUtil.emptyScreenImage( | |
| new net.imglib2.type.numeric.integer.UnsignedByteType(), | |
| [34, 31] as long[] | |
| ) | |
| def g2 = img.image().createGraphics() | |
| g2.setColor(java.awt.Color.white) | |
| g2.fillRect(0, 0, 34, 31) | |
| g2.setColor(java.awt.Color.black) | |
| g2.setFont(new java.awt.Font("SansSerif", java.awt.Font.BOLD, 32)) | |
| g2.drawString("👍", 0, 27) | |
| g2.dispose() | |
| //inverted = net.imglib2.img.array.ArrayImgs.unsignedBytes(img.dimensionsAsLongArray()) | |
| //ops.op("image.invert").input(img).output(inverted).compute() | |
| ascii = ops.op("image.ascii").input(img).apply() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment