# Scan over array of images

I would like to take in an array of images as input, and then call the ColorSeparate function on each of them, and retrieve this as output.

So far I have the following :

test1 = Import[
"C:\\filelocation\\*.jpg"]
Scan[ColorSeparate, test1]


This correctly obtains the array of images, however the Scan does not appear to produce an output. Have I approached this in the wrong way, and how might I be able to get output from this?

From the documentation of Scan:

Scan[f,expr] discards the results of applying f to the subexpressions in expr. Unlike Map, Scan does not build up a new expression to return.

So what you actually want is

Map[ColorSeparate,test1]


or

ColorSeparate/@test1


Like Graumagier has said, the function Scan does not return.

So if you want to see the "Scan", you must print it out since there is no return:

Scan[Print[ColorSeparate[#]] &, test1]


Or otherwise, you want to get a returned value, then use Map.

Map[ColorSeparate, test1]