-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRun.java
More file actions
31 lines (24 loc) · 924 Bytes
/
Run.java
File metadata and controls
31 lines (24 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package edu.project4;
import edu.project4.Transformations.TransformationGenerator;
import java.nio.file.Path;
public final class Run {
private Run() {
}
@SuppressWarnings({"checkstyle:UncommentedMain", "checkstyle:MagicNumber"})
public static void main(String[] args) {
Image image = new Image(1920, 1080);
try (ParallelThreadRenderer renderer = new ParallelThreadRenderer()) {
image = renderer.render(
image,
new Area(-1, -1, 2, 2),
TransformationGenerator.generateLinTransformationsWithColor(8),
TransformationGenerator.generateNonLinearTransformations(2),
300_000,
(short) 500
);
}
ImageProcessor processor = new LogGammaCorrection();
processor.process(image);
ImageUtils.save(image, Path.of("img.png"), ImageFormat.PNG);
}
}