Fix bug in WritePictureToFile.java