Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Stack overflow forbids using political images as image placeholders in questions and answers #269

Open
cirosantilli opened this issue May 1, 2021 · 1 comment
Labels
anti-ccp not-shitpost https://cirosantilli.com/china-dictatorship#shitpost

Comments

@cirosantilli
Copy link
Owner

cirosantilli commented May 1, 2021

Context: https://cirosantilli/china-dictatorship#stack-overflow-political-image-answer-placeholder-2021->>

Deleted post: https://graphicdesign.stackexchange.com/questions/83446/gimp-how-to-combine-two-images-side-by-side/147400#147400

Updated post: https://graphicdesign.stackexchange.com/questions/83446/gimp-how-to-combine-two-images-side-by-side/147400#147400


Reproduction of post that was deleted (markdown paste):

Start with a canvas of desired size, then move/crop/scale both images into that canvas

In most cases, you will have a desired target output image size, and you want to make the two images fit nicely there.

Start GIMP and create an empty canvas (Ctrl + N) with the desired size. Let's suppose that our target is 1280x720 (720p):

enter image description here

This leaves us with an empty white canvas:

enter image description here

Now, let's import the images we want to add to this canvas as layers.

To do that, hit:

Ctrl + Alt + O

and select both images.

The result is that now our list of layers on the bottom right now has three layers:

  • tank.png
  • budai.jpg
  • Background

enter image description here

Now, all we have to do is to either:

Just remember that you have to select the layer you want to operate on first from the list of layers: only that layer will be affected!

By doing that, I start with a rough approximation, and then refine it.

For example, that tank is way too big for the canvas, so I first scale it down to height 720p:

enter image description here

Now we see that it is going to be too wide to fit, so let's crop a rectangle of half the total width of 640 pixels and move it to the top left corner.

We can crop a rectangle of the exact width by specifying the selection size numerically as mentioned at: https://superuser.com/questions/463585/how-to-set-a-custom-sized-rectangle-select-area-in-gimp

enter image description here

Note that I don't even need to set the exact height, it's just easier to use a very large height so it won't cut the image vertically.

I then move the selection left to the desired position with the mouse, and after cropping we have:

enter image description here

Finally, I start working on the right image.

That one is not tall enough, so we are going to have to upscale it to 720 pixels, which is not ideal, but there's nothing we can do about it.

The cool thing is that I don't even need to cut the second layer, as it is already placed behind the top layer. I can just move it around until it looks good.

This gives the final output:

enter image description here

Test images used:

budai.jpg 1067x600

enter image description here

tank.png 1920x1080

enter image description here

Tested on GIMP 2.10.18, Ubuntu 20.10.

If the images don't need to be edited, just use ImageMagick from the command line

If you are using GIMP, you likely need to crop/scale the images to make them into a reasonable composition.

But for the specific case where you don't, ImageMagick from the command line is by far the easiest option as shown at https://stackoverflow.com/questions/20737061/merge-images-side-by-sidehorizontally/63575228#63575228 E.g. to fix a height of 500 pixels, just run:

convert +append image_1.png image_2.png -resize x500 new_image_conbined.png

and you are done, output:

enter image description here

@cirosantilli cirosantilli added not-shitpost https://cirosantilli.com/china-dictatorship#shitpost stack-overflow https://cirosantilli.com/china-dictatorship#stack-overflow labels May 1, 2021
@github-actions github-actions bot removed the stack-overflow https://cirosantilli.com/china-dictatorship#stack-overflow label May 1, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
anti-ccp not-shitpost https://cirosantilli.com/china-dictatorship#shitpost
Projects
None yet
Development

No branches or pull requests

1 participant