(graymap-average graymap1 graymap2)
This procedure creates a new 16 bit graymap by computing the average of both for each pixel position. The two suppied graymaps need to have the same dimensions, otherwise an error is signalled.
The resulting graymap is returned.
> (define a (graymap-readpng "horses-gray.png")) a > (define b (graymap-readpng "horses-gray2.png")) b > (define c (graymap-average a b)) c > (graymap-writepng c "horses-gray-average.png") ok >