{"action":"created","issue":{"url":"https://api.github.com/repos/python-pillow/Pillow/issues/1797","repository_url":"https://api.github.com/repos/python-pillow/Pillow","labels_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1797/labels{/name}","comments_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1797/comments","events_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1797/events","html_url":"https://github.com/python-pillow/Pillow/issues/1797","id":145476603,"number":1797,"title":"Cannot save thumbnail'd medium-large TIFFs","user":{"login":"Twangist","id":4309981,"avatar_url":"https://avatars.githubusercontent.com/u/4309981?v=3","gravatar_id":"","url":"https://api.github.com/users/Twangist","html_url":"https://github.com/Twangist","followers_url":"https://api.github.com/users/Twangist/followers","following_url":"https://api.github.com/users/Twangist/following{/other_user}","gists_url":"https://api.github.com/users/Twangist/gists{/gist_id}","starred_url":"https://api.github.com/users/Twangist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Twangist/subscriptions","organizations_url":"https://api.github.com/users/Twangist/orgs","repos_url":"https://api.github.com/users/Twangist/repos","events_url":"https://api.github.com/users/Twangist/events{/privacy}","received_events_url":"https://api.github.com/users/Twangist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-03T10:00:56Z","updated_at":"2016-04-03T11:15:32Z","closed_at":null,"body":"### What did you do?\r\nLoad a 3.5 MB TIFF by filename, call .thumbnail((100, 100)) on the image, then call the image's .save() method, with a new filename.\r\n\r\n### What did you expect to happen?\r\nI expected that the image would be saved :)\r\n\r\n### What actually happened?\r\n\"TypeError: write_byte() takes 2 positional arguments but 21581 were given\"\r\nHowever, this works as expected with a smaller TIF (1.2 MB) -- thumbnail is saved, no error.\r\n\r\n### What versions of Pillow and Python are you using?\r\nPython 3.4.2, Pillow 3.2.0, but the error also exists (with a slightly different exception message), in Pillow 2.9.x.\r\n\r\nStraight-line code with no dependencies that illustrates the issue:\r\n\r\n```python\r\nfrom PIL import Image\r\n\r\n# Open a smaller (1.2 MB) TIF and make it a \"thumbnail\":\r\nimage = Image.open(\"small.tif\")\r\nimage.thumbnail((100, 100))\r\n# Save it:\r\nimage.save(\"small--100x100-thumbnail.tif\")\r\n# That worked.\r\n\r\n# - - - - - - - - - - - - - - - - - - - - - - - -\r\n# Now try with a medium-large (3.5 MB) tif.\r\n# Open it:\r\nimage = Image.open(\"medium.tif\")\r\n\r\n# First, resize it to 100x100 (ignoring niceties about preserving aspect ratio)\r\n# and save, two ways -- both work:\r\nimage_resized = image.resize((100,100), resample=Image.BICUBIC)\r\nimage_resized.save(\"medium--100x100-resized-bicubic.tif\")\r\n\r\nimage_resized = image.resize((100,100), resample=Image.LANCZOS)\r\nimage_resized.save(\"medium--100x100-resized-lanczos.tif\")\r\n# That went well.\r\n\r\n# Now try thumbnailing and saving:\r\nimage.thumbnail((100, 100))\r\n# Try to save it -- blow up:\r\nimage.save(\"medium--100x100-thumbnail.tif\")\r\n```\r\n\r\n*** P.S.*** I tried to attach two sample TIFs, but regrettably github says:\r\n> Unfortunately, we don’t support that file type. Try again with a PNG, GIF, JPG, DOCX, PPTX, XLSX, TXT, PDF, or ZIP. \r\n\r\nOf course that's a silly suggestion.\r\n"},"comment":{"url":"https://api.github.com/repos/python-pillow/Pillow/issues/comments/204943292","html_url":"https://github.com/python-pillow/Pillow/issues/1797#issuecomment-204943292","issue_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1797","id":204943292,"user":{"login":"Twangist","id":4309981,"avatar_url":"https://avatars.githubusercontent.com/u/4309981?v=3","gravatar_id":"","url":"https://api.github.com/users/Twangist","html_url":"https://github.com/Twangist","followers_url":"https://api.github.com/users/Twangist/followers","following_url":"https://api.github.com/users/Twangist/following{/other_user}","gists_url":"https://api.github.com/users/Twangist/gists{/gist_id}","starred_url":"https://api.github.com/users/Twangist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Twangist/subscriptions","organizations_url":"https://api.github.com/users/Twangist/orgs","repos_url":"https://api.github.com/users/Twangist/repos","events_url":"https://api.github.com/users/Twangist/events{/privacy}","received_events_url":"https://api.github.com/users/Twangist/received_events","type":"User","site_admin":false},"created_at":"2016-04-03T11:15:32Z","updated_at":"2016-04-03T11:15:32Z","body":"[small-and-medium-tifs.zip](https://github.com/python-pillow/Pillow/files/201292/small-and-medium-tifs.zip)\r\nThe two example TIFs used by the code, in a zip file."}}