Context (can be skipped)
So maybe I am asking the wrong question for my problem. So let me start by explaining where my question comes from. Maybe this description also helps users that try to do the same thing to find this Q&A.
I have a Whatsapp thread on my mobile that I want to preserve as one big image. On my laptop I would use FastStone Capture to capture a scrolling screenshot, but on my mobile this is a bit difficult. So what I did so far is:
- I changed my whatsapp background to some uniform colour
- made many screenshots in landscape mode using build in Android functionality, each time scrolling a bit and making a screenshot, making sure there was some overlap
- transferred those to my laptop
stripped the titlebar and text entry bar (including the little gradient effect close to those bars) using ImageMagick on cygwin:
mogrify -crop 1920x717\!-0+208 +repage Screenshot_*
with slight modification for the first and last image to preserve the top and bottom:
mogrify -crop 1920x925\!-0-0 +repage ScreenshotFirst_*
mogrify -crop 1920x872\!-0+208 +repage ScreenshotLast_*
Now my problem is that the overlap for those images is not constant.
The Question
How can I combine two images with ImageMagick, when the bottom part of the first image is exactly the same as the bottom part of the second image?
How can I combine
AAAAAAAAAA
BBBBBBBBBB
CCCCCCCCCC
and
CCCCCCCCCC
DDDDDDDDDD
EEEEEEEEEE
FFFFFFFFFF
into
AAAAAAAAAA
BBBBBBBBBB
CCCCCCCCCC
DDDDDDDDDD
EEEEEEEEEE
FFFFFFFFFF
?
In addition to above ASCII-art here a real-life example. Considering these 3 screenshots:
- https://www.dropbox.com/s/hpesxxh85z6brn9/skype-chat-history-part1.gif?dl=0
- https://www.dropbox.com/s/5pwj0cw8p4z6tky/skype-chat-history-part2.gif?dl=0
- https://www.dropbox.com/s/3tp0i11kg5s1toz/skype-chat-history-part3.gif?dl=0
Now I would like to be able to combine these into one image with (preferable command line) open source tooling. As you see the amount of overlap between the images varies. The result should look like this:
(Failed) idea's on solution
I spend a full day searching, fully convinced that this should already be possible, that I was just overlooking the commands. I have not found it. The ImageMagick documentation and examples are super, the forums quite complete and helpful and Fred's Scripts is a good place to know when working with ImageMagic, but nothing on this (or similar) problem.
I have tried 'abusing' hudin for this, but did not get it to work (also not with the help of http://ubuntuforums.org/showthread.php?t=1856395&highlight=imagemagick%20panorama )
Any approach on how to do this is more then welcome.