process

Image processing process. The function traverses the picture, giving the input delegate a pointer to the color and traversal position in the form of a vector.

@safe
process
(
int Type = WithoutParallel
)
(,
void delegate
(
ref Color!ubyte
,
const Vecf
)
@safe
func
)

Parameters

image Image

Image processing.

func void delegate
(
ref Color!ubyte
,
const Vecf
)
@safe

Function processing.

Examples

// Darkening the picture in the corners.
myImage.process((ref e, position) {
    e = e * (position.x / myImage.width * position.y / myImage.height);
});

Meta