I would like to know if it is possible to apply a function to all files in a directory using Java?
More specifically, I am looking to read in all images in a folder, convert them to binary (two colours/black and white), and then save the binary image as a new image in another directory (probably directory\binary
, for example).
Something like this:
for(all images in folder)
read in image
make(binaryImg)
saveNewImage
endFor
I have 300 images so was hoping that there is a way to do this?
Many thanks.