I have a bunch of images whose size is 750x1000 pixels. I wanted to make them 1000x1000 without risking stretching the depicted object so I have enlarged the canvas and centered the original image. But how will I fill the canvas with the image's background?
If have a more complex image (e.g. photo) instead of a single color, you might want to check the heal selection tool. It does an incredible job filling up unwanted/empty parts with a surrounding 'texture'.
Filters → Enhance → Heal Selection…
see illustrations https://patdavid.net/2012/08/getting-around-in-gimp-heal-selection.html
- Use the color picker tool to sample the color of the background on the existing layer
- Layer>New layer, have it filled with the foreground color (ie, the one you just set with the color picker)
- Move it to the bottom of the layer stack
- Merge the visible layers (or not...)
If you want to change the ratio you have a couple of options:
A) Enlarge the image so that the smallest side fills the area so your 750px Width or height will be 1000px.
B) If you don't want to enlarge the photo you can crop the image based on the smallest side.
C) You can use an image editing program to fill in the blank area with other images.
There is a difference between the canvas and the layers. If you open an image and resize the canvas, the layers won't be re-sized to match it unless you tell it to. Area that doesn't have a layer over it will either be transparent (if the image has an alpha channel) or the background color (if it does not have an alpha channel).
Resizing the layers is not the same as scaling the layers. Resizing the layers will not stretch or otherwise alter the content.
To resize the canvas and layers at the same time, do the following:
- On the Image menu, click Canvas Size.
- Change the dimensions of the canvas.
- In the Resize layers list, select all layers.
If you've already resized the canvas, you can fix the layers by doing the following.
- In the Layers dock window, select the layer to resize.
- On the Layers menu, click Layer to Image Size.
If you ever end up with an area that you want to be background and you can select it, selecting it and pressing Ctrl + . will change it the background color too. You might need to do this if you resize a layer and the extra space is filled with transparency instead of the background color.