L_BM_MEDIAN

Send this message to median filter an L_BITMAPCLASS window's bitmap.

This changes the color of each pixel in a bitmap to the median color of pixels in its neighborhood. You control the effect by specifying the size of the neighborhood. This is similar to the L_BM_AVERAGE message, but it is used for noise reduction, rather than a blur effect

Parameter

Meaning

wParam

Specifies whether the window should be redrawn to reflect the image changes. Use 1 to redraw the window, or 0 not to redraw it.

lParam

The low order of the lParam parameter should specify the dimensions of the neighborhood used to calculate the effect. The value is the length, in pixels, of one side of a square.

Returns

SUCCESS

Function was successful.

< 0

An error occurred. Refer to Return Codes.