{"action":"created","issue":{"url":"https://api.github.com/repos/sarxos/webcam-capture/issues/633","repository_url":"https://api.github.com/repos/sarxos/webcam-capture","labels_url":"https://api.github.com/repos/sarxos/webcam-capture/issues/633/labels{/name}","comments_url":"https://api.github.com/repos/sarxos/webcam-capture/issues/633/comments","events_url":"https://api.github.com/repos/sarxos/webcam-capture/issues/633/events","html_url":"https://github.com/sarxos/webcam-capture/issues/633","id":308951613,"number":633,"title":"WebCam Capture Capturing same image again and again","user":{"login":"Abdulmoizaftab","id":31067083,"avatar_url":"https://avatars2.githubusercontent.com/u/31067083?v=4","gravatar_id":"","url":"https://api.github.com/users/Abdulmoizaftab","html_url":"https://github.com/Abdulmoizaftab","followers_url":"https://api.github.com/users/Abdulmoizaftab/followers","following_url":"https://api.github.com/users/Abdulmoizaftab/following{/other_user}","gists_url":"https://api.github.com/users/Abdulmoizaftab/gists{/gist_id}","starred_url":"https://api.github.com/users/Abdulmoizaftab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abdulmoizaftab/subscriptions","organizations_url":"https://api.github.com/users/Abdulmoizaftab/orgs","repos_url":"https://api.github.com/users/Abdulmoizaftab/repos","events_url":"https://api.github.com/users/Abdulmoizaftab/events{/privacy}","received_events_url":"https://api.github.com/users/Abdulmoizaftab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-27T12:40:46Z","updated_at":"2018-03-27T12:55:30Z","closed_at":null,"author_association":"NONE","body":"Images are being saved to a temp folder before being compressed and saved to a different folder. But the program is making same images over and over in temp folder and with automatically being refreshed sometimes for few hours and then again same old image.\r\n\r\nNo issue logged at log4j file logger and i have even coded to log unhandled exceptions.\r\n![same images 2](https://user-images.githubusercontent.com/31067083/37967726-ae6546fe-31e5-11e8-9b77-f152828d66e6.PNG)\r\n![same images](https://user-images.githubusercontent.com/31067083/37967728-ae8f8842-31e5-11e8-99d1-f1d42bec3b6b.PNG)\r\n\r\nAbove Images shows reoccurnce.   173651155_1287_1017_0081_1.jpg (First part of image name is timestamp)\r\n\r\n```\r\nMain\r\n     File TempDir = new File(\"./Temp\");\r\n     int camdetected= Webcam.getWebcams().size();\r\n          System.out.println(\"No. of Cameras detected=\"+camdetected);\r\n          logger.info(\"No. of Cameras detected=\"+camdetected);\r\n          System.out.println(\"Names=\"+Webcam.getWebcams());\r\n          logger.info(\"Names=\"+Webcam.getWebcams());\r\n  if(Camera1==null){\r\n                            cam1.Open(imwidth,imhieght);\r\n                            System.out.println(\"Camera 1 Opened (\"+imwidth+\"x\"+imhieght+\")\");\r\n                            logger.info(\"Camera 1 Opened (\"+imwidth+\"x\"+imhieght+\")\");\r\n}\r\n String filename=cam1.GetImage(TempDir+\"\\\\Image1.png\");\r\n\r\n\r\npublic class Camera1 {\r\n     public static Logger logger = LogManager.getLogger(Camera1.class.getName());\r\n    public void Open(int w, int h){\r\n        try {\r\n        AISAgent.Camera1 = Webcam.getWebcams().get(0);      \r\n        AISAgent.Camera1.setViewSize(new Dimension(w,h));\r\n        AISAgent.Camera1.open();\r\n          } catch (Exception ex) {\r\n              logger.error( \"Error:\",ex);\r\n         }\r\n    }\r\n    public String GetImage(String filename) {\r\n        \r\n         try {\r\n             ImageIO.write(AISAgent.Camera1.getImage(), \"PNG\", new File(filename));\r\n             \r\n             \r\n         } catch (IOException ex) {\r\n              logger.error( \"Error:\",ex);\r\n         }\r\n         return filename;\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/sarxos/webcam-capture/issues/comments/376514329","html_url":"https://github.com/sarxos/webcam-capture/issues/633#issuecomment-376514329","issue_url":"https://api.github.com/repos/sarxos/webcam-capture/issues/633","id":376514329,"user":{"login":"sarxos","id":472658,"avatar_url":"https://avatars1.githubusercontent.com/u/472658?v=4","gravatar_id":"","url":"https://api.github.com/users/sarxos","html_url":"https://github.com/sarxos","followers_url":"https://api.github.com/users/sarxos/followers","following_url":"https://api.github.com/users/sarxos/following{/other_user}","gists_url":"https://api.github.com/users/sarxos/gists{/gist_id}","starred_url":"https://api.github.com/users/sarxos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarxos/subscriptions","organizations_url":"https://api.github.com/users/sarxos/orgs","repos_url":"https://api.github.com/users/sarxos/repos","events_url":"https://api.github.com/users/sarxos/events{/privacy}","received_events_url":"https://api.github.com/users/sarxos/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T12:55:30Z","updated_at":"2018-03-27T12:55:30Z","author_association":"OWNER","body":"Did you check if a set of PNG images captured from the webcam also contain duplicates?"}}
{"actor":{"display_login":"sarxos"}}