Parallel processing of images
This commit is contained in:
@@ -43,6 +43,8 @@ public class Main {
|
|||||||
try {
|
try {
|
||||||
Files.walk(folder.toPath())
|
Files.walk(folder.toPath())
|
||||||
.filter(Main::isImage)
|
.filter(Main::isImage)
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
.parallelStream()
|
||||||
.forEach(p -> {
|
.forEach(p -> {
|
||||||
textArea.append("Processing: " + p.getFileName().toString() + "\n");
|
textArea.append("Processing: " + p.getFileName().toString() + "\n");
|
||||||
Image img = new Image(p.toFile());
|
Image img = new Image(p.toFile());
|
||||||
|
|||||||
Reference in New Issue
Block a user