Created
June 21, 2021 12:13
-
-
Save imagejan/dc4dd660e8e98aa61e0647bcf81d6094 to your computer and use it in GitHub Desktop.
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
/** | |
* This ImageJ script opens the icon from a given file | |
* (as displayed in the operating system) as an ij.ImagePlus | |
*/ | |
#@ File iconFile | |
import sun.awt.shell.ShellFolder | |
import ij.ImagePlus | |
import ij.process.ColorProcessor | |
sf = ShellFolder.getShellFolder(iconFile) | |
new ImagePlus("Icon", new ColorProcessor(sf.getIcon(true))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment