Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Bitmap-Flood-fill/Java/bitmap-flood-fill-2.java
Normal file
18
Task/Bitmap-Flood-fill/Java/bitmap-flood-fill-2.java
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import java.io.IOException;
|
||||
import java.awt.Color;
|
||||
import java.awt.Point;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
public class Test {
|
||||
public Test() throws IOException {
|
||||
BufferedImage image = ImageIO.read(new File("Unfilledcirc.png"));
|
||||
new FloodFill().floodFill(image, new Point(50, 50), Color.WHITE, Color.RED);
|
||||
ImageIO.write(image, "png", new File("output.png"));
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
new Test();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue