{"action":"opened","issue":{"url":"https://api.github.com/repos/andytuwm/Jimg/issues/1","labels_url":"https://api.github.com/repos/andytuwm/Jimg/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/andytuwm/Jimg/issues/1/comments","events_url":"https://api.github.com/repos/andytuwm/Jimg/issues/1/events","html_url":"https://github.com/andytuwm/Jimg/issues/1","id":55090828,"number":1,"title":"code left out for now","user":{"login":"andytuwm","id":9757828,"avatar_url":"https://avatars.githubusercontent.com/u/9757828?v=3","gravatar_id":"","url":"https://api.github.com/users/andytuwm","html_url":"https://github.com/andytuwm","followers_url":"https://api.github.com/users/andytuwm/followers","following_url":"https://api.github.com/users/andytuwm/following{/other_user}","gists_url":"https://api.github.com/users/andytuwm/gists{/gist_id}","starred_url":"https://api.github.com/users/andytuwm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andytuwm/subscriptions","organizations_url":"https://api.github.com/users/andytuwm/orgs","repos_url":"https://api.github.com/users/andytuwm/repos","events_url":"https://api.github.com/users/andytuwm/events{/privacy}","received_events_url":"https://api.github.com/users/andytuwm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-21T23:03:20Z","updated_at":"2015-01-21T23:03:20Z","closed_at":null,"body":"import java.awt.image.BufferedImage;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\nimport javax.imageio.ImageIO;\r\n\r\npublic class ByteArrayList {\r\n\r\n\tList<ByteArrayImg> match;\r\n\r\n\tpublic ByteArrayList() {\r\n\t\tmatch = new ArrayList<ByteArrayImg>();\r\n\t}\r\n\r\n\t/** \r\n\t * Adds an entry to the list of images to match with.\r\n\t * @param filename\r\n\t */\r\n\tpublic void initialize(String filename) {\r\n\t\tBufferedImage image;\r\n\t\ttry {\r\n\t\t\t// Read image.\r\n\t\t\timage = ImageIO.read(new File(filename));\r\n\t\t\t// Convert to ByteArrayImg\r\n\t\t\tByteArrayImg bai = new ByteArrayImg(image);\r\n\t\t\t// Add to list.\r\n\t\t\tmatch.add(bai);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"File not found.\");\r\n\t\t}\r\n\t}\r\n\r\n\t\r\n\t\r\n}"}}