Resolves: #i123690# handle the extremes Width or Height equal one

(cherry picked from commit f3263e7b8bfe740f8e1e7825214e3936cc938ea9)

Change-Id: I8d65ffa45ae69fe64826f8f49e4e6282b9db9807