ShadowMaker { public static void processImage(String in, String out) throws IOException { File imageFile = new File(in); BufferedImage bufferedImage= ImageIO.read(imageFile); int width = bufferedImage.getWidth(null); int height = bufferedImage.getHeight(null); BufferedImage alphaImage = new BufferedImage((width+(height/2)), height, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d= alphaImage.createGraphics(); g2d.drawImage(bufferedImage, (height/2), 0, null); g2d.dispose(); makeShadow(alphaImage); ImageIO.write(alphaImage, "png", new File(out)); }  static void main(String... args); static void processImage(String in, String out); static void makeShadow(BufferedImage image);  }
@Test public void testProcessImage() throws IOException { URL in = ShadowMakerTest.class.getResource("test.png"); URL out = ShadowMakerTest.class.getResource("out.png"); assertNotNull(in); assertNotNull(out); System.out.println(in.getFile()); System.out.println(out.getFile()); ShadowMaker.processImage( in.getFile(), out.getFile() ); }