Some java code for demonstrating image manipulation in class