{"id":504552,"date":"2026-11-24T11:21:53","date_gmt":"2026-11-24T08:21:53","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=504552"},"modified":"2026-11-24T11:21:53","modified_gmt":"2026-11-24T08:21:53","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=504552","title":{"rendered":"\u041f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044f PNG \u0441\u0431\u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0440\u0438\u043d\u0442\u0430: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430 Python"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/7c\/0b\/7f\/7c0b7f198c84ed9867888d5be8ab81ad.png\" width=\"1280\" height=\"730\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/7c\/0b\/7f\/7c0b7f198c84ed9867888d5be8ab81ad.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/7c\/0b\/7f\/7c0b7f198c84ed9867888d5be8ab81ad.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 \u043b\u0435\u0436\u0430\u0442 \u0442\u0440\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u0442\u0430. \u0414\u0432\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0432 \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0438\u043a\u0435, \u0430 \u0442\u0440\u0435\u0442\u044c\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0431\u0435\u043b\u0443\u044e \u043f\u043b\u0430\u0448\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u0451\u043c\u043d\u043e\u043c \u0444\u043e\u043d\u0435. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0435\u0447\u0430\u0442\u0438 \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435 \u0444\u0430\u0439\u043b\u0430, \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 \u0440\u0430\u0441\u0447\u0451\u0442 \u043d\u0430\u0440\u0430\u0432\u043d\u0435 \u0441 \u0440\u0438\u0441\u0443\u043d\u043a\u043e\u043c. \u042f \u0441\u043e\u0431\u0440\u0430\u043b \u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 PNG, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u0430\u043a\u0435\u0442\u0430 \u0432 \u043f\u0435\u0447\u0430\u0442\u044c.<\/p>\n<h3>\u041e\u0434\u0438\u043d \u0445\u043e\u043b\u0441\u0442, \u0442\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u043a\u0435\u0442\u0430<\/h3>\n<p>\u0423 \u0432\u0441\u0435\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 \u0445\u043e\u043b\u0441\u0442 1200 \u00d7 800 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u043e\u0442 (200, 150) \u0434\u043e (1000, 650). \u0423 \u043e\u0431\u0440\u0430\u0437\u0446\u0430 clean \u0444\u043e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439. \u0412 stray \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043e\u0434\u043d\u0430 \u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0433\u043b\u0443. \u0412 white \u0442\u043e\u0442 \u0436\u0435 \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u0441\u0432\u0435\u0434\u0451\u043d \u043d\u0430 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0444\u043e\u043d. \u041e\u0431\u0440\u0430\u0437\u0446\u044b \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435, \u0432 \u043d\u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.<\/p>\n<p>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 PNG \u043d\u0430 \u0431\u0435\u043b\u043e\u043c \u0444\u043e\u043d\u0435 \u043e\u0431\u043c\u0430\u043d\u0447\u0438\u0432: \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043b\u0438 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c, \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e \u0430\u043b\u044c\u0444\u0430-\u043a\u0430\u043d\u0430\u043b\u0443. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0441\u0435\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0441 \u0430\u043b\u044c\u0444\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0441 \u0430\u043b\u044c\u0444\u043e\u0439 \u043d\u0435 \u043d\u0438\u0436\u0435 16. \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u044b\u0431\u0440\u0430\u043d \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u044d\u0442\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<pre><code>from pathlib import Pathfrom PIL import Image, ImageDrawsize = (1200, 800)clean = Image.new(\"RGBA\", size)ImageDraw.Draw(clean).rectangle((200, 150, 999, 649), fill=(34, 97, 150, 255))stray = clean.copy()stray.putpixel((1199, 799), (0, 0, 0, 3))white = Image.new(\"RGBA\", size, \"white\")white.alpha_composite(clean)for name, image in ((\"clean\", clean), (\"stray\", stray), (\"white\", white)):    image.save(f\"{name}.png\")def report(path: Path, threshold: int = 16):    with Image.open(path) as source:        if source.format != \"PNG\" or getattr(source, \"n_frames\", 1) != 1:            raise ValueError(\"Expected a single-frame PNG\")        alpha = source.convert(\"RGBA\").getchannel(\"A\")        nonzero = alpha.getbbox()        visible = alpha.point([255 if x &gt;= threshold else 0 for x in range(256)])        return nonzero, visible.getbbox(), alpha.getextrema()for name in (\"clean\", \"stray\", \"white\"):    print(name, *report(Path(f\"{name}.png\")))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper\"><\/span><\/a><\/div><\/pre>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0443 \u0442\u0440\u0451\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0424\u0430\u0439\u043b<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041b\u044e\u0431\u0430\u044f \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0430\u043b\u044c\u0444\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0410\u043b\u044c\u0444\u0430 \u043e\u0442 16<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u043b\u044c\u0444\u044b<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">clean.png<\/p>\n<\/td>\n<td>\n<p align=\"left\">(200, 150, 1000, 650)<\/p>\n<\/td>\n<td>\n<p align=\"left\">(200, 150, 1000, 650)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0\u2013255<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">stray.png<\/p>\n<\/td>\n<td>\n<p align=\"left\">(200, 150, 1200, 800)<\/p>\n<\/td>\n<td>\n<p align=\"left\">(200, 150, 1000, 650)<\/p>\n<\/td>\n<td>\n<p align=\"left\">0\u2013255<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">white.png<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0, 0, 1200, 800)<\/p>\n<\/td>\n<td>\n<p align=\"left\">(0, 0, 1200, 800)<\/p>\n<\/td>\n<td>\n<p align=\"left\">255\u2013255<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0423 clean \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f 800 \u00d7 500, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Pillow \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0443\u044e \u0438 \u043d\u0438\u0436\u043d\u044e\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0415\u0441\u043b\u0438 \u0432\u0435\u0441\u044c \u0445\u043e\u043b\u0441\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e 30 \u0441\u043c \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435, \u0441\u0430\u043c \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u0437\u0430\u0439\u043c\u0451\u0442 20 \u0441\u043c. \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043b 30 \u0441\u043c \u043f\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0442\u0443, \u044d\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0447\u0430\u0442\u044c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/e2\/a0\/3c\/e2a03c3edabca25a8479a8d656baeb86.png\" alt=\"\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0436\u0451\u043b\u0442\u0430\u044f \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a\" title=\"\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0436\u0451\u043b\u0442\u0430\u044f \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a\" width=\"1280\" height=\"720\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/e2\/a0\/3c\/e2a03c3edabca25a8479a8d656baeb86.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/e2\/a0\/3c\/e2a03c3edabca25a8479a8d656baeb86.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0436\u0451\u043b\u0442\u0430\u044f \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0436\u0451\u043b\u0442\u0430\u044f \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a<\/p>\n<p>\u0412 stray \u0442\u043e\u0447\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043b\u0430 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0434\u043e 1000 \u00d7 650, \u0430 \u043f\u0440\u0438 \u043f\u043e\u0440\u043e\u0433\u0435 16 \u0438\u0441\u0447\u0435\u0437\u043b\u0430 \u0438\u0437 \u0440\u0430\u0441\u0447\u0451\u0442\u0430. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0430\u0451\u0442 \u043f\u043e\u0432\u043e\u0434 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u043e\u043c \u0444\u043e\u043d\u0435. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0440\u0438\u0441\u043a\u043e\u0432\u0430\u043d\u043d\u043e: \u0443 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043d\u0438 \u0441\u043b\u0430\u0431\u0430\u044f \u0430\u043b\u044c\u0444\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0430\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u044b\u0441\u043b\u0430.<\/p>\n<p>\u0423 white \u0430\u043b\u044c\u0444\u0430 \u0432\u0435\u0437\u0434\u0435 \u0440\u0430\u0432\u043d\u0430 255. \u041f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u044d\u0442\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c, \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043b\u0438 \u0431\u0435\u043b\u0443\u044e \u0437\u0430\u043b\u0438\u0432\u043a\u0443: \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0430\u043a\u0435\u0442\u0435 \u0431\u0435\u043b\u0430\u044f \u0440\u0430\u043c\u043a\u0430 \u043d\u0443\u0436\u043d\u0430, \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043e\u043d\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435. \u0422\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u043b\u0443\u0447\u0448\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0443 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0443\u0441\u0442\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 None \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f.<\/p>\n<h3>\u0413\u0434\u0435 \u044d\u0442\u043e\u0442 \u043e\u0442\u0447\u0451\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d<\/h3>\n<p>\u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0445\u043e\u043b\u0441\u0442\u0430. \u0412 \u043e\u0442\u0447\u0451\u0442 \u044f \u0431\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440, \u043e\u0431\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 \u0432 \u043c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440\u0430\u0445 \u0434\u043b\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430. \u0414\u043b\u044f \u043f\u0435\u0447\u0430\u0442\u0438 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u0441\u0447\u0451\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0430 \u0432\u044b\u0431\u043e\u0440 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0442\u0438\u0440\u0430\u0436\u0430. \u0426\u0432\u0435\u0442, \u0431\u0435\u043b\u0430\u044f \u043f\u043e\u0434\u043b\u043e\u0436\u043a\u0430 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0431\u0435.<\/p>\n<p>\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u0433\u0440\u0430\u043d\u0438\u0446 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u0441\u0432\u0435\u0440\u0435\u043d\u0430 \u0441 <a href=\"https:\/\/pillow.readthedocs.io\/en\/stable\/reference\/Image.html\" rel=\"noopener nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 Pillow<\/a>.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1111628\/\">https:\/\/habr.com\/ru\/articles\/1111628\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u043f\u0430\u043f\u043a\u0435 \u043b\u0435\u0436\u0430\u0442 \u0442\u0440\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u0442\u0430. \u0414\u0432\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0432 \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0438\u043a\u0435, \u0430 \u0442\u0440\u0435\u0442\u044c\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0431\u0435\u043b\u0443\u044e \u043f\u043b\u0430\u0448\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u0451\u043c\u043d\u043e\u043c \u0444\u043e\u043d\u0435. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0435\u0447\u0430\u0442\u0438 \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435 \u0444\u0430\u0439\u043b\u0430, \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 \u0440\u0430\u0441\u0447\u0451\u0442 \u043d\u0430\u0440\u0430\u0432\u043d\u0435 \u0441 \u0440\u0438\u0441\u0443\u043d\u043a\u043e\u043c. \u042f \u0441\u043e\u0431\u0440\u0430\u043b \u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 PNG, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u0430\u043a\u0435\u0442\u0430 \u0432 \u043f\u0435\u0447\u0430\u0442\u044c.\u041e\u0434\u0438\u043d \u0445\u043e\u043b\u0441\u0442, \u0442\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0430\u043a\u0435\u0442\u0430\u0423 \u0432\u0441\u0435\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 \u0445\u043e\u043b\u0441\u0442 1200 \u00d7 800 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439, \u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u043e\u0442 (200, 150) \u0434\u043e (1000, 650). \u0423 \u043e\u0431\u0440\u0430\u0437\u0446\u0430 clean \u0444\u043e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439. \u0412 stray \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043e\u0434\u043d\u0430 \u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0433\u043b\u0443. \u0412 white \u0442\u043e\u0442 \u0436\u0435 \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u0441\u0432\u0435\u0434\u0451\u043d \u043d\u0430 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439 \u0444\u043e\u043d. \u041e\u0431\u0440\u0430\u0437\u0446\u044b \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435, \u0432 \u043d\u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 PNG \u043d\u0430 \u0431\u0435\u043b\u043e\u043c \u0444\u043e\u043d\u0435 \u043e\u0431\u043c\u0430\u043d\u0447\u0438\u0432: \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043b\u0438 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c, \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e \u0430\u043b\u044c\u0444\u0430-\u043a\u0430\u043d\u0430\u043b\u0443. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0441\u0435\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0441 \u0430\u043b\u044c\u0444\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0441 \u0430\u043b\u044c\u0444\u043e\u0439 \u043d\u0435 \u043d\u0438\u0436\u0435 16. \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u044b\u0431\u0440\u0430\u043d \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u044d\u0442\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438.from pathlib import Pathfrom PIL import Image, ImageDrawsize = (1200, 800)clean = Image.new(&#171;RGBA&#187;, size)ImageDraw.Draw(clean).rectangle((200, 150, 999, 649), fill=(34, 97, 150, 255))stray = clean.copy()stray.putpixel((1199, 799), (0, 0, 0, 3))white = Image.new(&#171;RGBA&#187;, size, &#171;white&#187;)white.alpha_composite(clean)for name, image in ((&#171;clean&#187;, clean), (&#171;stray&#187;, stray), (&#171;white&#187;, white)):    image.save(f&#187;{name}.png&#187;)def report(path: Path, threshold: int = 16):    with Image.open(path) as source:        if source.format != &#171;PNG&#187; or getattr(source, &#171;n_frames&#187;, 1) != 1:            raise ValueError(&#171;Expected a single-frame PNG&#187;)        alpha = source.convert(&#171;RGBA&#187;).getchannel(&#171;A&#187;)        nonzero = alpha.getbbox()        visible = alpha.point([255 if x &gt;= threshold else 0 for x in range(256)])        return nonzero, visible.getbbox(), alpha.getextrema()for name in (&#171;clean&#187;, &#171;stray&#187;, &#171;white&#187;):    print(name, *report(Path(f&#187;{name}.png&#187;)))\u041a\u0430\u043a\u0438\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0443 \u0442\u0440\u0451\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432\u0424\u0430\u0439\u043b\u041b\u044e\u0431\u0430\u044f \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0430\u043b\u044c\u0444\u0430\u0410\u043b\u044c\u0444\u0430 \u043e\u0442 16\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u043b\u044c\u0444\u044bclean.png(200, 150, 1000, 650)(200, 150, 1000, 650)0\u2013255stray.png(200, 150, 1200, 800)(200, 150, 1000, 650)0\u2013255white.png(0, 0, 1200, 800)(0, 0, 1200, 800)255\u2013255\u0423 clean \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f 800 \u00d7 500, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Pillow \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0443\u044e \u0438 \u043d\u0438\u0436\u043d\u044e\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0415\u0441\u043b\u0438 \u0432\u0435\u0441\u044c \u0445\u043e\u043b\u0441\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e 30 \u0441\u043c \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435, \u0441\u0430\u043c \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u0437\u0430\u0439\u043c\u0451\u0442 20 \u0441\u043c. \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043b 30 \u0441\u043c \u043f\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0442\u0443, \u044d\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0447\u0430\u0442\u044c.\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0436\u0451\u043b\u0442\u0430\u044f \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a\u041a\u0440\u0430\u0441\u043d\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0436\u0451\u043b\u0442\u0430\u044f \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a\u0412 stray \u0442\u043e\u0447\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043b\u0430 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0434\u043e 1000 \u00d7 650, \u0430 \u043f\u0440\u0438 \u043f\u043e\u0440\u043e\u0433\u0435 16 \u0438\u0441\u0447\u0435\u0437\u043b\u0430 \u0438\u0437 \u0440\u0430\u0441\u0447\u0451\u0442\u0430. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0430\u0451\u0442 \u043f\u043e\u0432\u043e\u0434 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u043e\u043c \u0444\u043e\u043d\u0435. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0440\u0438\u0441\u043a\u043e\u0432\u0430\u043d\u043d\u043e: \u0443 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043d\u0438 \u0441\u043b\u0430\u0431\u0430\u044f \u0430\u043b\u044c\u0444\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0430\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u044b\u0441\u043b\u0430.\u0423 white \u0430\u043b\u044c\u0444\u0430 \u0432\u0435\u0437\u0434\u0435 \u0440\u0430\u0432\u043d\u0430 255. \u041f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u044d\u0442\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c, \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043b\u0438 \u0431\u0435\u043b\u0443\u044e \u0437\u0430\u043b\u0438\u0432\u043a\u0443: \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0430\u043a\u0435\u0442\u0435 \u0431\u0435\u043b\u0430\u044f \u0440\u0430\u043c\u043a\u0430 \u043d\u0443\u0436\u043d\u0430, \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043e\u043d\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435. \u0422\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u043b\u0443\u0447\u0448\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0443 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0443\u0441\u0442\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 None \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f.\u0413\u0434\u0435 \u044d\u0442\u043e\u0442 \u043e\u0442\u0447\u0451\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d\u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0445\u043e\u043b\u0441\u0442\u0430. \u0412 \u043e\u0442\u0447\u0451\u0442 \u044f \u0431\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440, \u043e\u0431\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 \u0432 \u043c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440\u0430\u0445 \u0434\u043b\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430. \u0414\u043b\u044f \u043f\u0435\u0447\u0430\u0442\u0438 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u0441\u0447\u0451\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0430 \u0432\u044b\u0431\u043e\u0440 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0442\u0438\u0440\u0430\u0436\u0430. \u0426\u0432\u0435\u0442, \u0431\u0435\u043b\u0430\u044f \u043f\u043e\u0434\u043b\u043e\u0436\u043a\u0430 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0431\u0435.\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u0433\u0440\u0430\u043d\u0438\u0446 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u0441\u0432\u0435\u0440\u0435\u043d\u0430 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 Pillow.\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1111628\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-504552","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/504552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=504552"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/504552\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=504552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=504552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=504552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}