Coordinate ranges are from 0 to width-1 (or height-1). This means when calculating the rotation, using `x = this->width - y;` would lead to x of range from `this->width` (when `y=0`) to `1` (when `y=this->width-1`). Thus additional -1 is required to get correct coordinates after rotation and prevent image from clipping.