@@ -0,0 +1,2417 @@
+import java.awt.Color;%0Aimport java.awt.image.BufferedImage;%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0Aimport javax.imageio.ImageIO;%0A%0Apublic class img2list%0A%7B%0A        public static void main(String%5B%5D args)%0A        %7B%0A                if (args.length != 1)%0A                %7B%0A                        System.out.println(%22Usage: %3Cimage filename%3E%22);%0A                        System.exit(1);%0A                %7D%0A%0A                System.out.println(%22// Processing %22 + args%5B0%5D);%0A%0A                Path file = Paths.get(args%5B0%5D);%0A                if (! Files.exists(file))%0A                %7B%0A                        System.out.println(%22img2list: ERROR. File %22 + file + %22 doesn't exist!%22);%0A                        System.exit(2);%0A                %7D%0A%0A                try%0A                %7B%0A                        BufferedImage image = ImageIO.read(new File(file.toString()));%0A%0A                        if (image == null)%0A                        %7B%0A                                System.out.println(%22img2list: ERROR. File %22 + file + %22 doesn't seem to be a picture!!%22);%0A                                System.exit(3);%0A                        %7D%0A%0A                        int width  = image.getWidth();%0A                        int height = image.getHeight();%0A%0A                        System.out.println(%22// %22 + file + %22 is %22 + width + %22 pixels wide by %22 + height + %22 pixels high.%22);%0A%0A                        System.out.println(%22//x:y:red:green:blue%22);%0A                        for (int x=0; x %3C width; x++)%0A                                for (int y=0; y %3C height; y++)%0A                                %7B%0A                                        Color colour = new Color(image.getRGB(x,y));%0A                                        int r = colour.getRed();%0A                                        int g = colour.getGreen();%0A                                        int b = colour.getBlue();%0A%0A                                        System.out.println(x + %22:%22 + y + %22:%22 + r + %22:%22 + g + %22:%22 + b);%0A                                %7D%0A%0A                %7D%0A                catch (IOException e)%0A                %7B%0A                        System.out.println(%22img2list: ERROR. Got an exception reading file %22 + file + %22!%22);%0A                        e.printStackTrace();%0A                        System.exit(4);%0A                %7D%0A%0A                System.exit(0);%0A        %7D%0A%7D%0A

Create img2list.java