{"action":"created","issue":{"url":"https://api.github.com/repos/imagemin/imagemin-optipng/issues/9","repository_url":"https://api.github.com/repos/imagemin/imagemin-optipng","labels_url":"https://api.github.com/repos/imagemin/imagemin-optipng/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/imagemin/imagemin-optipng/issues/9/comments","events_url":"https://api.github.com/repos/imagemin/imagemin-optipng/issues/9/events","html_url":"https://github.com/imagemin/imagemin-optipng/issues/9","id":156693836,"number":9,"title":"optimizationLevel 0 Error in file","user":{"login":"thisconnect","id":546900,"avatar_url":"https://avatars.githubusercontent.com/u/546900?v=3","gravatar_id":"","url":"https://api.github.com/users/thisconnect","html_url":"https://github.com/thisconnect","followers_url":"https://api.github.com/users/thisconnect/followers","following_url":"https://api.github.com/users/thisconnect/following{/other_user}","gists_url":"https://api.github.com/users/thisconnect/gists{/gist_id}","starred_url":"https://api.github.com/users/thisconnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thisconnect/subscriptions","organizations_url":"https://api.github.com/users/thisconnect/orgs","repos_url":"https://api.github.com/users/thisconnect/repos","events_url":"https://api.github.com/users/thisconnect/events{/privacy}","received_events_url":"https://api.github.com/users/thisconnect/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-25T08:41:43Z","updated_at":"2016-05-25T09:25:21Z","closed_at":null,"body":"Hi I am testing and comparing all plugins and I am wondering if this is the correct behavior.\r\n\r\nFrom the readme \r\n> optimizationLevel\r\n> Type: number\r\n> Default: 3\r\n> Select an optimization level between 0 and 7.\r\n\r\nwith `optimizationLevel: 0` I got the following error:\r\n\r\n```\r\n{ Error: Error in file: images/imagemin.png\r\n\r\n** Processing: /var/folders/vc/g0g62cj15vg3vwyn3pdbp6bc0000gp/T/cce3c2b8-f207-44d9-8190-b364455560ed\r\nWarning: Extraneous data found after IEND\r\n400x400 pixels, 4x8 bits/pixel, RGB+alpha\r\nRecoverable errors found in input. Fixing...\r\nIDAT recoding is necessary, but is disabled by the user.\r\nError: Can't continue\r\n\r\n** Status report\r\n1 file(s) have been processed.\r\n1 error(s) have been encountered.\r\n\r\n    at ChildProcess.exithandler (child_process.js:202:12)\r\n    at emitTwo (events.js:106:13)\r\n    at ChildProcess.emit (events.js:191:7)\r\n    at maybeClose (internal/child_process.js:850:16)\r\n    at Socket.<anonymous> (internal/child_process.js:323:11)\r\n    at emitOne (events.js:96:13)\r\n    at Socket.emit (events.js:188:7)\r\n    at Pipe._handle.close [as _onclose] (net.js:492:12)\r\n  killed: false,\r\n  code: 1,\r\n  signal: null,\r\n  cmd: '/Users/me/project/node_modules/optipng-bin/vendor/optipng -strip all -clobber -force -fix -o 0 -out /var/folders/vc/g0g62cj15vg3vwyn3pdbp6bc0000gp/T/401ab274-d280-49f7-b6f3-2f3bd0d558bb /var/folders/vc/g0g62cj15vg3vwyn3pdbp6bc0000gp/T/cce3c2b8-f207-44d9-8190-b364455560ed',\r\n  stdout: '',\r\n  stderr: '** Processing: /var/folders/vc/g0g62cj15vg3vwyn3pdbp6bc0000gp/T/cce3c2b8-f207-44d9-8190-b364455560ed\\nWarning: Extraneous data found after IEND\\n400x400 pixels, 4x8 bits/pixel, RGB+alpha\\nRecoverable errors found in input. Fixing...\\nIDAT recoding is necessary, but is disabled by the user.\\nError: Can\\'t continue\\n\\n** Status report\\n1 file(s) have been processed.\\n1 error(s) have been encountered.\\n' }\r\n```\r\n\r\ntest\r\n```javascript\r\nconst imagemin = require('imagemin');\r\nconst imageminOptipng = require('imagemin-optipng');\r\n\r\nimagemin(['images/*.png'], 'build', {\r\n  use: [imageminOptipng({\r\n    optimizationLevel: 0\r\n  })]\r\n})\r\n.then(() => {\r\n  console.log('Images optimized');\r\n})\r\n.catch(err => {\r\n  console.log(err)\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/imagemin/imagemin-optipng/issues/comments/221520182","html_url":"https://github.com/imagemin/imagemin-optipng/issues/9#issuecomment-221520182","issue_url":"https://api.github.com/repos/imagemin/imagemin-optipng/issues/9","id":221520182,"user":{"login":"kevva","id":709159,"avatar_url":"https://avatars.githubusercontent.com/u/709159?v=3","gravatar_id":"","url":"https://api.github.com/users/kevva","html_url":"https://github.com/kevva","followers_url":"https://api.github.com/users/kevva/followers","following_url":"https://api.github.com/users/kevva/following{/other_user}","gists_url":"https://api.github.com/users/kevva/gists{/gist_id}","starred_url":"https://api.github.com/users/kevva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevva/subscriptions","organizations_url":"https://api.github.com/users/kevva/orgs","repos_url":"https://api.github.com/users/kevva/repos","events_url":"https://api.github.com/users/kevva/events{/privacy}","received_events_url":"https://api.github.com/users/kevva/received_events","type":"User","site_admin":false},"created_at":"2016-05-25T09:25:21Z","updated_at":"2016-05-25T09:25:21Z","body":"That's how `optipng` should work (according to the [source code](https://fossies.org/linux/optipng/src/optipng/optim.c))."}}
{"actor":{"display_login":"kevva"}}