Moved resizing images to a background thread and showed a progress dialog until they are done