Suppose I have the following image. I want to extend/expand the grey background behind the model. The extension should only be upward and sideward. I don't want to extend downward because it will be ugly.
The purpose is to make the image into size (w, h) where w is greater than or equal to current image width and h is greater than or equal to current image height.
One way I could think is, to copy the pixel in the (0, 0) and fill the image extension using this pixel value. However, as you might notice, the grey background at bottom right is slightly different than the rest. This will make noticeable colour difference.
What are better algorithms that is usually used to do that? The resulting image should not have noticeable colour difference and looks natural.