• Home
  • SEM
    • PPC
    • SEO
    • How To
  • Bangladesh
  • School
    • HTTP
    • REP
    • Bots n’ htaccess
    • Source Code
    • Excel 2010
    • HTML XHTML Entities
    • Gmail Operators
    • HTML & ASCII
  • About
    • Privy
    • About This Blog
  • Contact
  • বাংলা

Saidul Hassan

Digital Marketing Evangelist

Home / Bangladesh / How do I join two images using command-line

How do I join two images using command-line

25 Jun, 2021 By Saidul Hassan · Filed Under: Bangladesh

To join images horizontally (in alphabetical order):

convert +append *.png out.png

To stack images vertically:

convert -append *.png out.png

That should be run in a terminal into the folder containing png files to join them all.
https://askubuntu.com/questions/226054/how-do-i-join-two-images-in-ubuntu

A gui for that would be:
a file manager context menu to join selected images.

An easy way when it comes to that is Thunar’s custom actions:

To join selected images vertically (into one png file, in alphabetical order, no matter their extension) add this custom action (‘Edit – Configure custom actions’):

convert -append %F joined-vertical.png

To join horizontally:

convert +append %F joined-horizontal.png

The same commands can be used in a .desktop file in /.local/share/file-manager/actions which adds a context menu for Nautilus and/or PCManFM.

Example for vertical join:

[Desktop Entry]
Type=Action
Name=Join images (vertically)
Profiles=profile-zero;
TargetLocation=true
Icon=gthumb

[X-Action-Profile profile-zero]
Basenames=image/*;*;
Exec=convert -append %F joined-image.png
Name[en_US]=Default profile
Name[en]=Default profile
Name[C]=Default profile

=============
Or We can easily join, i.e. “montage” images into one large image with the following command

montage -geometry 500 image1 image2 […] output

See the project page for many parameters of the geometry option. In the example above all images will be scaled to a width of 500 pixels before they are joined. Adapt this value for your image sizes. In case you need to have a fixed height choose x500 instead. The other dimension will be scaled to preserve the aspect ratio.
https://askubuntu.com/questions/166751/merging-two-pictures

Link to this post!
The following two tabs change content below.
  • Bio
  • Latest Posts
My Twitter profileMy Facebook profileMy Google+ profileMy LinkedIn profileMy Instagram profileMy Pinterest profile

Saidul Hassan

Managing Partner at Up Arrow Consulting
COO at Up Arrow Consulting, MCC manager, & Technical SEO consultant. Certified Google Partners and Microsoft Bing Ads Accredited Professional, Python enthusiast, wannabe SysAdmin. Graduated from School of Management & Business Administration (SOMBA), Khulna University.
My Twitter profileMy Facebook profileMy Google+ profileMy LinkedIn profileMy Instagram profileMy Pinterest profile

Latest posts by Saidul Hassan (see all)

  • Batch script to create directories & moving fixed number of files to those directories - 30 Apr, 2021
  • How to use PrismJS syntax highlighter on WordPress without plugin - 30 Mar, 2020
  • Download an Entire Website for Offline Viewing - 26 Nov, 2019

Share:

  • Twitter
  • Facebook
  • LinkedIn
  • Pinterest
  • Pocket
  • Email
  • Print

First published on 23 Jan, 2018 · Last updated 25 Jun, 2021 ·

Batch script to create directories & moving fixed number of files to those directories

30 Apr, 2021 By Saidul Hassan

How to use PrismJS syntax highlighter on WordPress without plugin

30 Mar, 2020 By Saidul Hassan

Download an Entire Website for Offline Viewing

26 Nov, 2019 By Saidul Hassan

How to color highlight .htaccess files in Xed/Gedit

20 Aug, 2018 By Saidul Hassan

HMA Pro VPN Setup for Multiple Locations without User/Password Every time in Linux CLI

14 May, 2018 By Saidul Hassan

  • ♥ Bangladesh ♥
    Log in · Privacy Policy · Contact
    Copyright © 2011 Saidul Hassan

  • DMCA

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.