I have written an SWT Java application and would like to configure it to use a high quality icon in the OSX dock. This is my current code:
// Prepare window
final Shell window = new Shell();
// Load icons
Display display = window.getDisplay();
ClassLoader loader = InTraceStandaloneUI.class.getClassLoader();
InputStream is16 = loader.getResourceAsStream(
"org/intrace/icons/intrace16.gif");
Image icon16 = new Image(display, is16);
is16.close();
InputStream is32 = loader.getResourceAsStream(
"org/intrace/icons/intrace32.gif");
Image icon32 = new Image(display, is32);
is32.close();
window.setImages(new Image[] {icon16, icon32});
This works for loading the 16x16 and 32x32 logos which look OK on Windows but the logo used by OSX still looks really pixelated. Do I just need to specify a third version with a higher resolution or should I be using a different image format or API?