WLJS LogoWLJS Notebook

ImageFileApply

ImageFileApply[f, inputfile, outputfile] applies the function f to the list of channel values for each pixel of the image stored in inputfile and stores the result in outputfile.

Examples

Invert an image file:

ImageFileApply[1 - # &, "input.png", "output.png"]

Apply a grayscale transformation:

ImageFileApply[Mean, "color.png", "gray.png"]

Please visit the official Wolfram Language Reference for more details.

On this page