Added drag and drop support
More tolerance for images without power-of-two dimensions