private ImageIcon findCompatibleImageForSize(String imagePath, int desiredSize) {

		String name = imagePath;
		int dotIndex = name.lastIndexOf('.');
		if (dotIndex != -1) {
			name = name.substring(0, dotIndex);
		}

		name = stripSizeOffName(name);

		name += desiredSize;
		if (dotIndex != -1) {
			// add the dot back on
			name += location.substring(dotIndex);
		}

		return getImageIcon(name);
	}
Constructor

@param location filename for the icon (relative or absolute)
Ghidra/Framework/Docking/src/main/java/docking/util/image/ToolIconURL.java