{"id":32558,"date":"2019-08-25T12:21:10","date_gmt":"2019-08-25T03:21:10","guid":{"rendered":"http:\/\/w3devlabs.net\/wp\/?p=32558"},"modified":"2019-08-25T12:21:10","modified_gmt":"2019-08-25T03:21:10","slug":"%ed%8c%8c%ec%9d%b4%ec%8d%ac%ec%97%90%ec%84%9c-thumbnail%eb%a7%8c%eb%93%a4%eb%a9%b4%ec%84%9c-io-%ec%97%90%eb%9f%ac%eb%82%9c-%ea%b2%bd%ec%9a%b0-%ed%95%b4%ea%b2%b0%eb%b0%a9%eb%b2%95","status":"publish","type":"post","link":"http:\/\/w3devlabs.net\/wp\/?p=32558","title":{"rendered":"\ud30c\uc774\uc36c\uc5d0\uc11c thumbnail\ub9cc\ub4e4\uba74\uc11c io \uc5d0\ub7ec\ub09c \uacbd\uc6b0 \ud574\uacb0\ubc29\ubc95"},"content":{"rendered":"<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 3pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 26pt;\">\ud30c\uc774\uc36c\uc5d0\uc11c thumbnail\ub9cc\ub4e4\uba74\uc11c io \uc5d0\ub7ec\ub09c \uacbd\uc6b0 \ud574\uacb0\ubc29\ubc95<\/font><\/span><\/p>\n<p><br style=\"letter-spacing: normal;\"><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">JPG\uc774\ubbf8\uc9c0\uc758 \ud06c\uae30\ub97c \ubcc0\uacbd\ud558\uae30 \uc704\ud574 \uc544\ub798\uc640 \uac19\uc740 \ucf54\ub4dc\ub97c \uc791\uc131\ud558\uace0 \uc2e4\ud589\ud558\uba74\uc11c \uc624\ub958\uac00 \ubc1c\uc0dd\ud55c\uacbd\uc6b0 \ud574\uacb0\ucc45\uc744 \uc815\ub9ac\ud55c\uac83\uc774\ub2e4.<\/font><\/span><\/p>\n<p><br style=\"letter-spacing: normal;\"><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">im = Image.open(source_fullpath)<\/font><\/span><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">im.thumbnail(image_resize)<\/font><\/span><\/p>\n<p><br style=\"letter-spacing: normal;\"><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">\uc704\uc758 \ucf54\ub4dc\ub294 \uc774\ubbf8\uc9c0\ub97c \uc77d\uc5b4\uc640\uc11c thunbnail\uc744 \ub9cc\ub4e4\uae30 \uc704\ud55c\uac83\uc774\ub2e4 \uadf8\ub7f0\ub370 \uac11\uc790\uae30 \uc544\ub798\uc640 \uac19\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud558\uc600\ub2e4. <\/font><\/span><\/p>\n<p><br style=\"letter-spacing: normal;\"><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">OSError: broken data stream when reading image file<\/font><\/span><\/p>\n<p><br style=\"letter-spacing: normal;\"><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">\uc774\ub7f0\uacbd\uc6b0 \uc544\ub798\uc758 \uc635\uc158\uc744 \ucd94\uac00\ud558\uba74 \uc815\uc0c1\uc801\uc73c\ub85c \uc791\ub3d9\ub418\ub294\uac83\uc744 \ud655\uc778\ud558\uc600\ub2e4.<\/font><\/span><\/p>\n<p><br style=\"letter-spacing: normal;\"><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">from PIL import Image, ImageFile<\/font><\/span><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">ImageFile.LOAD_TRUNCATED_IMAGES = True<\/font><\/span><\/p>\n<p><br style=\"letter-spacing: normal;\"><\/p>\n<p style=\"line-height: 1.38; letter-spacing: normal; margin-top: 0pt; margin-bottom: 0pt;\" dir=\"ltr\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap;\"><font style=\"font-size: 11pt;\">\ucd9c\ucc98 : <\/font><\/span><a style=\"letter-spacing: normal;\" href=\"https:\/\/stackoverflow.com\/questions\/42462431\/oserror-broken-data-stream-when-reading-image-file\"><span style=\"letter-spacing: normal; vertical-align: baseline; white-space: pre-wrap; -webkit-text-decoration-skip: none; text-decoration-skip-ink: none;\"><font style=\"font-size: 11pt;\">https:\/\/stackoverflow.com\/questions\/42462431\/oserror-broken-data-stream-when-reading-image-file<\/font><\/span><\/a><\/p>\n<p><br class=\"Apple-interchange-newline\" style=\"line-height: normal; letter-spacing: normal;\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud30c\uc774\uc36c\uc5d0\uc11c thumbnail\ub9cc\ub4e4\uba74\uc11c io \uc5d0\ub7ec\ub09c \uacbd\uc6b0 \ud574\uacb0\ubc29\ubc95 JPG\uc774\ubbf8\uc9c0\uc758 \ud06c\uae30\ub97c \ubcc0\uacbd\ud558\uae30 \uc704\ud574 \uc544\ub798\uc640 \uac19\uc740 \ucf54\ub4dc\ub97c \uc791\uc131\ud558\uace0 \uc2e4\ud589\ud558\uba74\uc11c \uc624\ub958\uac00 \ubc1c\uc0dd\ud55c\uacbd\uc6b0 \ud574\uacb0\ucc45\uc744 \uc815\ub9ac\ud55c\uac83\uc774\ub2e4. im = Image.open(source_fullpath) im.thumbnail(image_resize) \uc704\uc758 \ucf54\ub4dc\ub294 \uc774\ubbf8\uc9c0\ub97c \uc77d\uc5b4\uc640\uc11c thunbnail\uc744 \ub9cc\ub4e4\uae30 \uc704\ud55c\uac83\uc774\ub2e4 \uadf8\ub7f0\ub370 \uac11\uc790\uae30 \uc544\ub798\uc640 \uac19\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud558\uc600\ub2e4. OSError: broken data stream when reading image file \uc774\ub7f0\uacbd\uc6b0 \uc544\ub798\uc758 \uc635\uc158\uc744 \ucd94\uac00\ud558\uba74 \uc815\uc0c1\uc801\uc73c\ub85c \uc791\ub3d9\ub418\ub294\uac83\uc744 \ud655\uc778\ud558\uc600\ub2e4. from PIL import Image, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/w3devlabs.net\/wp\/?p=32558\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\ud30c\uc774\uc36c\uc5d0\uc11c thumbnail\ub9cc\ub4e4\uba74\uc11c io \uc5d0\ub7ec\ub09c \uacbd\uc6b0 \ud574\uacb0\ubc29\ubc95&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[5836],"tags":[25240,25242,25239,25238,5625,25241],"class_list":["post-32558","post","type-post","status-publish","format-standard","hentry","category-5836","tag-ioerror","tag-stackoverflow","tag-25239","tag-25238","tag-5625","tag-25241","entry"],"_links":{"self":[{"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/32558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32558"}],"version-history":[{"count":1,"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/32558\/revisions"}],"predecessor-version":[{"id":32559,"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/32558\/revisions\/32559"}],"wp:attachment":[{"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32558"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/w3devlabs.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}