Question: I have a number of photos. I want to add these images togther pixel-wise (not mean or median). I have Imagemagick installed, and I tried:

```
composite -compose plus IMG* ~/Desktop/sum.png

```

But the output image

[![enter image description here](https://i.stack.imgur.com/wnlnM.jpg)](https://i.stack.imgur.com/wnlnM.jpg)

wasn't noticeably brighter than the input images:

[![enter image description here](https://i.stack.imgur.com/GH7tW.jpg)](https://i.stack.imgur.com/GH7tW.jpg)

Since I have 30 input images, I expected the output to be much brighter.

Why isn't this working, and how do I sum images, using either Imagemagick, or other free tool?

Answer: 
Imagemagick cannot be used to compose 30 images in one step. The [documentation](http://www.imagemagick.org/Usage/compose/) states:

> 
> Image Composition is the process of merging two (and only two) images
>  in a variety of ways.
> 
> 
> 

The following simple bash script creates a black 100x100 image (temp.png) and compose all the test\_\*.jpg images (assuming all of them are 100x100) one by one to this image.

```
convert -size 100x100 canvas:black temp.png
for f in test_*.jpg; do
  composite temp.png "${f}" -compose Plus temp.png
done

```
Thanks to asalamon74 for a solution using a bash script, which I modified to use PNG rather than JPEG, as szulat suggested.

```
convert -size 100x100 canvas:black temp.png

for f in IMG_*.jpg; do
  composite temp.png ${f} -compose Plus temp.png
done

```

I tested, and this works.