Little refactoring of the image SWT implementation