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?".
I am trying to merge overlapping pictures. The pictures are 800x800, with a 200 px overlap on the height. I want to overlay the images and merge them via a linear alpha mask. I am creating a mask with a linear alpha on the bottom of the first image (p1.png) and top of the second image (p2.png) as follows:
How can I fix middle part (overlap) of the final image? It seems to be "undersaturated"? My theory is that the two linear gradients going in opposite directions should add up leaving the original colours after overlapping the pictures?
Help is appreciated, I am quite new to ImageMagick.
Goose997 wrote: ↑2018-02-20T11:50:18-07:00How can I fix middle part (overlap) of the final image? It seems to be "undersaturated"? My theory is that the two linear gradients going in opposite directions should add up leaving the original colours after overlapping the pictures?
Edited to add: The images "p1" and "p2" you linked were JPGs. If you meant to upload PNG files, the hosting service may have converted them. The rest of my comment below would apply if the input images have a 200 pixel high fade-to-white on the bottom or top edge. If the input images have transparency already, the command I suggested would probably have to be modified.
At a command prompt with Windows 10 and IM 7.0.7-23, I get a result like you describe by using just your input images "p1.jpg" and "p2.jpg", and this single command...
GeeMack wrote: ↑2018-02-20T13:44:00-07:00
Edited to add: The images "p1" and "p2" you linked were JPGs. If you meant to upload PNG files, the hosting service may have converted them. The rest of my comment below would apply if the input images have a 200 pixel high fade-to-white on the bottom or top edge. If the input images have transparency already, the command I suggested would probably have to be modified.
It seems the hosting service converted PNG to JPG. The fade-to-white on the picture is the alpha mask from the PNG.
Thanks for the help. It does the alignment and some form of merge? However, it creates a pink/purple smudge on some parts of the image. I will experiment further with the command line you gave me and see where it gets me to.
Goose997 wrote: ↑2018-02-20T20:23:03-07:00It seems the hosting service converted PNG to JPG. The fade-to-white on the picture is the alpha mask from the PNG.
If the input images fade to transparent at the edges, you might try adding "-background white -alpha off" right after reading in the images.