fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.awt.*;
  4. import java.awt.image.*;
  5. import javax.imageio.*;
  6.  
  7.  
  8. class Main
  9. {
  10. public static void main (String[] args) throws java.lang.Exception {
  11.  
  12. int width = 100;
  13. int height = 100;
  14. BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
  15.  
  16. Graphics2D g = bufferedImage.createGraphics();
  17. g.setColor(Color.white);
  18. g.fillRect(0, 0, width, height);
  19. g.setColor(Color.black);
  20. g.fillOval(0, 0, width, height);
  21.  
  22.  
  23. ImageIO.write(bufferedImage, "png", System.out);
  24. }
  25. }
Success #stdin #stdout 0.14s 248768KB
stdin
Standard input is empty
stdout