Need help combining images!

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
simonthewes
Posts: 2
Joined: 2019-03-09T16:14:26-07:00
Authentication code: 1152

Need help combining images!

Post by simonthewes »

Hi, I'm new ImageMagick and I need help. I'll try my best to explain my situation and what I want to accomplish.

I have scans of an old comic book in jpg. (horizontal panels of similar length and width). I want to stack all the panels in sets of 4 with no borders or outlines. (So one image would contain 4 panels that are stacked on top of each other).

There's exactly 212 images and I already have them numbered and in order.

I already know how to combine them into one very long strip with this command:

mkdir output
magick *.jpg -append "output\\output.jpg"

I can go and start cropping out manually but there has to be an easier way.
If anyone can help me out with this ill very much appreciate it.

Im on Windows 10 using ImageMagick-7.0.8-32-Q16-x64-dll
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Need help combining images!

Post by fmw42 »

If I understand, you will have to write a script loop to read 4 images at a time from your directory and append them. Then move to the next ones. That will be OS dependent. I do not code on Windows, so you will have to wait for a Windows user to help or look up how to make a script for loop in Windows.

P.S. It always helps to understand what you want if you provide a set of input images and your desired output image. This forum does not support direct upload. But you can post your images to some free hosting service and put the URLs here.


____________________

For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Need help combining images!

Post by snibgo »

I don't understand what is needed. Perhaps append the first four images to make one output, then the next four images for the second output, and so on. Is that right? But you mention cropping. What cropping is needed?

Sample images would help.
snibgo's IM pages: im.snibgo.com
simonthewes
Posts: 2
Joined: 2019-03-09T16:14:26-07:00
Authentication code: 1152

Re: Need help combining images!

Post by simonthewes »

Yes, you're exactly right. Sorry that I couldn't explain it better. I mentioned cropping after I run the command I posted because I know no other way.

Unfortunately, I'm unable to post sample images.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Need help combining images!

Post by fmw42 »

We still do not understand what you mean by cropping. If all 4 images are the same size and you append them, then no cropping should be needed. Please clarify where and what should be cropped? Also you could post some mockup of your output and show where it needs cropping.
Post Reply