Deduplicate some conditional branches in RasterImageView
When adding Fit to Width, 3e10699ac37c blindly copied a bunch of
code, for example without properly merging if conditions.
ba63c8a44f46 already corrected some of that, let's fix the rest here.