{"action":"created","issue":{"url":"https://api.github.com/repos/python-pillow/Pillow/issues/1156","labels_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1156/labels{/name}","comments_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1156/comments","events_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1156/events","html_url":"https://github.com/python-pillow/Pillow/issues/1156","id":65206677,"number":1156,"title":"inconsistent data when reading jpeg file","user":{"login":"matthias-k","id":4093707,"avatar_url":"https://avatars.githubusercontent.com/u/4093707?v=3","gravatar_id":"","url":"https://api.github.com/users/matthias-k","html_url":"https://github.com/matthias-k","followers_url":"https://api.github.com/users/matthias-k/followers","following_url":"https://api.github.com/users/matthias-k/following{/other_user}","gists_url":"https://api.github.com/users/matthias-k/gists{/gist_id}","starred_url":"https://api.github.com/users/matthias-k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthias-k/subscriptions","organizations_url":"https://api.github.com/users/matthias-k/orgs","repos_url":"https://api.github.com/users/matthias-k/repos","events_url":"https://api.github.com/users/matthias-k/events{/privacy}","received_events_url":"https://api.github.com/users/matthias-k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-30T13:03:41Z","updated_at":"2015-03-30T16:15:32Z","closed_at":null,"body":"Hi,\r\n\r\nwhen reading jpeg files with pillow, I get inconsistend results for two python installations on my machine. Take for example [this image](https://kalliope.matthias-k.org/~matthias/tmp/i05june05_static_street_boston_p1010764.jpeg):\r\n\r\nOn my ubuntu 14.04s native python2.7 (numpy, pillow 2.7.0 installed from pip), I get\r\n\r\n    >>> np.array(PIL.Image.open('i05june05_static_street_boston_p1010764.jpeg'))\r\n\r\n    array([[[ 84, 129, 135],\r\n        [ 84, 128, 131],\r\n        [ 72, 110, 111],\r\n        ..., \r\n        [ 21,  36,  39],\r\n        [ 35,  57,  55],\r\n        [ 74,  99,  96]],\r\n\r\n       [[ 84, 129, 135],\r\n        [ 84, 128, 131],\r\n        [ 72, 111, 110],\r\n        ..., \r\n        [ 27,  42,  45],\r\n        [ 38,  60,  58],\r\n        [ 78, 103, 100]],\r\n\r\n       [[ 81, 129, 133],\r\n        [ 82, 127, 130],\r\n        [ 70, 110, 109],\r\n        ..., \r\n        [ 32,  47,  50],\r\n        [ 35,  57,  55],\r\n        [ 78, 103, 100]],\r\n\r\n       ..., \r\n       [[139, 141, 140],\r\n        [134, 136, 135],\r\n        [129, 131, 130],\r\n        ..., \r\n        [250, 245, 255],\r\n        [253, 248, 255],\r\n        [255, 250, 255]],\r\n\r\n       [[132, 134, 133],\r\n        [129, 131, 130],\r\n        [127, 129, 128],\r\n        ..., \r\n        [183, 174, 201],\r\n        [184, 175, 204],\r\n        [184, 175, 202]],\r\n\r\n       [[129, 131, 130],\r\n        [130, 132, 131],\r\n        [131, 133, 132],\r\n        ..., \r\n        [177, 168, 199],\r\n        [179, 170, 201],\r\n        [180, 171, 202]]], dtype=uint8)\r\n\r\nWhen using an anaconda installation of python 2.7 on the same machine with numpy and pillow 2.7.0 installed with conda, however, the result looks like this:\r\n\r\n    >>> np.array(PIL.Image.open('i05june05_static_street_boston_p1010764.jpeg'))\r\n    array([[[ 84, 128, 137],\r\n        [ 84, 127, 133],\r\n        [ 72, 110, 111],\r\n        ..., \r\n        [ 21,  36,  39],\r\n        [ 35,  57,  55],\r\n        [ 73,  99,  96]],\r\n\r\n       [[ 84, 128, 137],\r\n        [ 84, 127, 133],\r\n        [ 71, 111, 110],\r\n        ..., \r\n        [ 27,  42,  45],\r\n        [ 38,  60,  58],\r\n        [ 77, 103, 100]],\r\n\r\n       [[ 81, 128, 134],\r\n        [ 82, 127, 132],\r\n        [ 70, 110, 109],\r\n        ..., \r\n        [ 32,  47,  50],\r\n        [ 35,  56,  57],\r\n        [ 77, 103, 100]],\r\n\r\n       ..., \r\n       [[139, 141, 140],\r\n        [134, 136, 135],\r\n        [129, 131, 130],\r\n        ..., \r\n        [250, 245, 255],\r\n        [253, 248, 255],\r\n        [255, 250, 255]],\r\n\r\n       [[132, 134, 133],\r\n        [129, 131, 130],\r\n        [127, 129, 128],\r\n        ..., \r\n        [183, 174, 203],\r\n        [184, 175, 204],\r\n        [184, 175, 204]],\r\n\r\n       [[129, 131, 130],\r\n        [130, 132, 131],\r\n        [131, 133, 132],\r\n        ..., \r\n        [177, 167, 201],\r\n        [179, 169, 203],\r\n        [180, 170, 204]]], dtype=uint8)\r\n\r\nNotice for example the differences in the first line of output or the last line of output, where differences of as much as 2 occur.\r\n\r\nI am aware that anaconda comes with it's own version of libjpeg, but shouldn't jpeg decoding be consistent? Any help would be highly appreciated, as for my application I need reliable jpeg decoding.\r\n\r\nBest,\r\n  Matthias"},"comment":{"url":"https://api.github.com/repos/python-pillow/Pillow/issues/comments/87738914","html_url":"https://github.com/python-pillow/Pillow/issues/1156#issuecomment-87738914","issue_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1156","id":87738914,"user":{"login":"homm","id":128982,"avatar_url":"https://avatars.githubusercontent.com/u/128982?v=3","gravatar_id":"","url":"https://api.github.com/users/homm","html_url":"https://github.com/homm","followers_url":"https://api.github.com/users/homm/followers","following_url":"https://api.github.com/users/homm/following{/other_user}","gists_url":"https://api.github.com/users/homm/gists{/gist_id}","starred_url":"https://api.github.com/users/homm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/homm/subscriptions","organizations_url":"https://api.github.com/users/homm/orgs","repos_url":"https://api.github.com/users/homm/repos","events_url":"https://api.github.com/users/homm/events{/privacy}","received_events_url":"https://api.github.com/users/homm/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T16:15:32Z","updated_at":"2015-03-30T16:15:32Z","body":"The truth is I also doesn't know ) I've checked the libjpeg-turbo package versions in aptitude, what obviously will not work for anaconda. It is also possible what anaconda uses vanilla libjpeg, not libjpeg-turbo."}}