Handle the case of incorrectly upscaling images when the original width or height are 1 by calculating the correct pixel offsets as necessary.
The bug will manifest itself as an ASAN failure as per T70356 or an incorrect result like what might be shown in the File Browser's thumbnail view:
[Before]
[After]

