Sunday, June 10, 2018

Using GIMP to Resize Photos to a Specific Size

This afternoon I am editing photos for a website. I would like to take some images from 4992x4000 down to exactly 620 px across. I will be using Gimp and a little math to make this happen in seven steps.

First things first, I could do the math in my head, but I want to make this a step by step process. The second thing is, unpwnd doesn't require a specific size so the images in this walkthru will not be 620 px. That is not lost on me, I happen to Blogger as my platform and it has very different tools from Wordpress.

Step one. Open the image.
Step two. Click on Set Image Canvas Size. The dialog box will open and show that the image is currently 4992x4000. That is nothing like 620 px across.
Step three. I am going to adjust the width and the height. For the width, I need to lose those to extra pixels, it is so small no one will notice. So width becomes 2992-2=2990.

Height is another story. I am going to take away a multiple of 620. I decided that I would go with 620 times 2, so what I end up with is 2760. That is 4000-1240=2760.

Before I hit resize, I clicked the Center button. It just so happens that my subjects are dead center and this works. If it did not, I could have adjusted this manually.
Step four. I want to point out that I have been working with Canvas Size and not Image Size. Essentially, I am cropping the image to a particular size based on some math rather than an eye for photographic composition. Actual photographers have a great eye for composition and would not use this method.

Anyway, I think I can trim a little more of the edges and when I do that, I want my height and width to be an exact multiple of 620. I take the width of 2990 and divide by 620 which gives me 4.822 and some change. I do the same for the height which gives my 4.451 and change.

Now for a trick. I am going to take four away from each number leaving 0.822 and 0.451. Both of these numbers need to multiplied by 620. 620 is the only number I know for this process, which is why it keeps popping up. The results are 510 and 280.

2990-510 is 2480 and 2760-280 is also 2480.  2480 divided by 620 is 4.

Again, I am using the center bottom so I don't clip away my subjects. Also, this could a manual process.
Step five. Scale the image. I could do this part 2 ways. I picked the easy way: I scaled the image to 620. I could have also used the drop down box to select percent and typed in 25. There is no difference.
Step six. This is the result, an image that appears way too small. But not really, GIMP didn't change the scale of the display and the image is actually much bigger.
 Step seven. I set my view to 1:1. Looks good.
While all of this seems labor intensive, it is. But only once. Changes are your camera always outputs the same size image so you can save this as a macro making the process automatic.

And here is the final output at 620 px.

Neat, eh?