{"action":"created","issue":{"url":"https://api.github.com/repos/kamadak/exif-rs/issues/5","repository_url":"https://api.github.com/repos/kamadak/exif-rs","labels_url":"https://api.github.com/repos/kamadak/exif-rs/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/kamadak/exif-rs/issues/5/comments","events_url":"https://api.github.com/repos/kamadak/exif-rs/issues/5/events","html_url":"https://github.com/kamadak/exif-rs/issues/5","id":330868235,"node_id":"MDU6SXNzdWUzMzA4NjgyMzU=","number":5,"title":"InvalidFormat(\"Unexpected next IFD\")","user":{"login":"jonashagstedt","id":603835,"node_id":"MDQ6VXNlcjYwMzgzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/603835?v=4","gravatar_id":"","url":"https://api.github.com/users/jonashagstedt","html_url":"https://github.com/jonashagstedt","followers_url":"https://api.github.com/users/jonashagstedt/followers","following_url":"https://api.github.com/users/jonashagstedt/following{/other_user}","gists_url":"https://api.github.com/users/jonashagstedt/gists{/gist_id}","starred_url":"https://api.github.com/users/jonashagstedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonashagstedt/subscriptions","organizations_url":"https://api.github.com/users/jonashagstedt/orgs","repos_url":"https://api.github.com/users/jonashagstedt/repos","events_url":"https://api.github.com/users/jonashagstedt/events{/privacy}","received_events_url":"https://api.github.com/users/jonashagstedt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-09T08:58:44Z","updated_at":"2018-06-17T13:11:54Z","closed_at":"2018-06-17T13:11:54Z","author_association":"NONE","body":"Trying to read exif data from a Canon CR2 file and get this error:\r\n```\r\n    InvalidFormat(\r\n        \"Unexpected next IFD\"\r\n    )\r\n```\r\n\r\nHere is an example CR2 file: https://www.imaging-resource.com/PRODS/canon-1dx/E1DXINBI000050.CR2.HTM\r\n\r\nI'm using `kamadak-exif = \"0.3.0\"`\r\n\r\nSteps to replicate:\r\n1.  Put a CR2 file in `/tmp/E1DXINBI000050.CR2`\r\n2.  add  `kamadak-exif = \"0.3.0\"` to Cargo.toml\r\n3.  run `cargo run`\r\n\r\nHere is some code to replicate the error:\r\n\r\n```rust\r\nextern crate exif;\r\n\r\nuse std::fs::File;\r\nuse std::io::BufReader;\r\n\r\nuse exif::*;\r\n\r\nfn main() {\r\n    let reader = File::open(\"/tmp/E1DXINBI000050.CR2\")\r\n        .map(BufReader::new)\r\n        .map(|mut r| Reader::new(&mut r))\r\n        .unwrap();\r\n\r\n    // Output the error\r\n    if reader.is_err() {\r\n        println!(\"{:#?}\", reader.err());\r\n        panic!(\"fail\");\r\n    }   \r\n    let reader = reader.unwrap();\r\n    let field = reader.get_field(Tag::DateTime, false).unwrap();\r\n\r\n    if let Value::Ascii(ref vec) = field.value {\r\n        let date = DateTime::from_ascii(vec[0]).unwrap();\r\n        println!(\"{:#?}\", date);\r\n    }  \r\n}\r\n```\r\n\r\nUpdate: let me know if you need any more info or if there is something else I can do to help with this.\r\nI don't have a direct understanding of the EXIF format to try to solve this my self\r\n\r\nTried this with a Nikon NEF file and that works fine so it's only the Canon CR2 format so far"},"comment":{"url":"https://api.github.com/repos/kamadak/exif-rs/issues/comments/397878178","html_url":"https://github.com/kamadak/exif-rs/issues/5#issuecomment-397878178","issue_url":"https://api.github.com/repos/kamadak/exif-rs/issues/5","id":397878178,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Nzg3ODE3OA==","user":{"login":"kamadak","id":4836155,"node_id":"MDQ6VXNlcjQ4MzYxNTU=","avatar_url":"https://avatars0.githubusercontent.com/u/4836155?v=4","gravatar_id":"","url":"https://api.github.com/users/kamadak","html_url":"https://github.com/kamadak","followers_url":"https://api.github.com/users/kamadak/followers","following_url":"https://api.github.com/users/kamadak/following{/other_user}","gists_url":"https://api.github.com/users/kamadak/gists{/gist_id}","starred_url":"https://api.github.com/users/kamadak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamadak/subscriptions","organizations_url":"https://api.github.com/users/kamadak/orgs","repos_url":"https://api.github.com/users/kamadak/repos","events_url":"https://api.github.com/users/kamadak/events{/privacy}","received_events_url":"https://api.github.com/users/kamadak/received_events","type":"User","site_admin":false},"created_at":"2018-06-17T13:11:54Z","updated_at":"2018-06-17T13:11:54Z","author_association":"OWNER","body":"Fixed in version 0.3.1."}}
{"actor":{"display_login":"kamadak"}}