Preview size (rebased onto develop)



This is the same as gh-2711 but rebased onto develop.

----

Remove the arbitrary size (1500x1500) limit for preview. The preview is still not available for big images.
It will be slower for large image. This will not be fixed in this PR since the work is not scheduled for 5.0.3
To Test:
 * Open a 2kx2k image