graymap-average

Synopsis

(graymap-average graymap1 graymap2)

Parameters

  • graymap1
  • graymap2

Description

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.

Side Effects

Return Value

The resulting graymap is returned.

Example

> (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
>