Fix image preview bug

In Chrome, the image preview would not size properly because we needed
the image to load before we could work with it's dimensions.

Added a iapFinishViewerImg() function to take care of that.
Fixed image scaling bug as well.