Simple Image Inverter in Java