{"id":944293,"date":"2024-12-26T23:03:17","date_gmt":"2024-12-26T15:03:17","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/944293.html"},"modified":"2024-12-26T23:03:20","modified_gmt":"2024-12-26T15:03:20","slug":"python%e5%a6%82%e4%bd%95%e5%88%b6%e4%bd%9cjpg","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/944293.html","title":{"rendered":"python\u5982\u4f55\u5236\u4f5cjpg"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25081339\/78a1d39b-c3e7-440d-bdfe-881be667e461.webp\" alt=\"python\u5982\u4f55\u5236\u4f5cjpg\" \/><\/p>\n<p><p> <strong>\u5236\u4f5cJPG\u56fe\u50cf\u7684\u8fc7\u7a0b\u53ef\u4ee5\u901a\u8fc7Python\u4e2d\u7684PIL\uff08Python Imaging Library\uff09\u5e93\u6765\u5b9e\u73b0\u3001PIL\u5e93\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u56fe\u50cf\u5904\u7406\u529f\u80fd\u3001\u53ef\u4ee5\u65b9\u4fbf\u5730\u521b\u5efa\u3001\u4fee\u6539\u548c\u4fdd\u5b58\u56fe\u50cf\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u5728Python\u4e2d\u5236\u4f5cJPG\u56fe\u50cf\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5PIL\u5e93\uff0c\u73b0\u4ee3\u7684\u7248\u672c\u53eb\u505aPillow\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7\u5bfc\u5165\u5e93\u6765\u5f00\u59cb\u5904\u7406\u56fe\u50cf\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u6b65\u9aa4\u6765\u521b\u5efa\u4e00\u4e2aJPG\u56fe\u50cf\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5Pillow\u5e93<\/strong>\uff1a\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c<code>pip install Pillow<\/code>\u6765\u5b89\u88c5Pillow\u5e93\u3002<\/li>\n<li><strong>\u521b\u5efa\u56fe\u50cf<\/strong>\uff1a\u4f7f\u7528Pillow\u7684Image\u6a21\u5757\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u56fe\u50cf\uff0c\u6307\u5b9a\u5927\u5c0f\u548c\u989c\u8272\u3002<\/li>\n<li><strong>\u4fdd\u5b58\u56fe\u50cf<\/strong>\uff1a\u4f7f\u7528<code>save<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3aJPG\u683c\u5f0f\u3002<\/li>\n<\/ol>\n<p><p>\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u6bcf\u4e2a\u6b65\u9aa4\uff0c\u5e76\u5c55\u793a\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u8fd9\u4e00\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u548c\u5bfc\u5165Pillow\u5e93<\/h3>\n<\/p>\n<p><p>Pillow\u662fPIL\u7684\u4e00\u4e2a\u73b0\u4ee3\u5316\u7248\u672c\uff0c\u5b83\u7ee7\u627f\u4e86PIL\u7684\u6240\u6709\u7279\u6027\uff0c\u5e76\u589e\u52a0\u4e86\u4e00\u4e9b\u65b0\u7684\u529f\u80fd\u3002\u5728\u4f7f\u7528Pillow\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install Pillow<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728Python\u811a\u672c\u4e2d\u5bfc\u5165Pillow\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import Image<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u521b\u5efa\u65b0\u7684\u56fe\u50cf<\/h3>\n<\/p>\n<p><p>\u8981\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u56fe\u50cf\uff0c\u9996\u5148\u8981\u51b3\u5b9a\u56fe\u50cf\u7684\u5c3a\u5bf8\u3001\u989c\u8272\u6a21\u5f0f\u548c\u989c\u8272\u586b\u5145\u3002Pillow\u652f\u6301\u591a\u79cd\u989c\u8272\u6a21\u5f0f\uff0c\u5982\u201cRGB\u201d\u3001\u201cRGBA\u201d\u3001\u201cL\u201d\u7b49\u3002RGB\u6a21\u5f0f\u662f\u6700\u5e38\u7528\u7684\uff0c\u7528\u4e8e\u5f69\u8272\u56fe\u50cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u65b0\u7684RGB\u56fe\u50cf\uff0c\u5927\u5c0f\u4e3a100x100\uff0c\u989c\u8272\u4e3a\u7ea2\u8272<\/p>\n<p>img = Image.new(&#39;RGB&#39;, (100, 100), color=&#39;red&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a100&#215;100\u50cf\u7d20\u7684\u7ea2\u8272\u56fe\u50cf\u3002<code>Image.new()<\/code>\u51fd\u6570\u7528\u4e8e\u521b\u5efa\u65b0\u56fe\u50cf\uff0c\u53c2\u6570\u5305\u62ec\u989c\u8272\u6a21\u5f0f\u3001\u5c3a\u5bf8\u548c\u989c\u8272\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u7ed8\u5236\u548c\u4fee\u6539\u56fe\u50cf<\/h3>\n<\/p>\n<p><p>Pillow\u8fd8\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u56fe\u50cf\u7ed8\u5236\u548c\u4fee\u6539\u529f\u80fd\u3002\u53ef\u4ee5\u5728\u56fe\u50cf\u4e0a\u7ed8\u5236\u5f62\u72b6\u3001\u6dfb\u52a0\u6587\u672c\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1. \u7ed8\u5236\u5f62\u72b6<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>ImageDraw<\/code>\u6a21\u5757\u5728\u56fe\u50cf\u4e0a\u7ed8\u5236\u5f62\u72b6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import ImageDraw<\/p>\n<p>draw = ImageDraw.Draw(img)<\/p>\n<p>draw.rectangle([10, 10, 90, 90], outline=&quot;black&quot;, fill=&quot;blue&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5728\u56fe\u50cf\u4e0a\u7ed8\u5236\u4e86\u4e00\u4e2a\u586b\u5145\u4e3a\u84dd\u8272\uff0c\u8fb9\u7f18\u4e3a\u9ed1\u8272\u7684\u77e9\u5f62\u3002<\/p>\n<\/p>\n<p><h4>2. \u6dfb\u52a0\u6587\u672c<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>ImageDraw<\/code>\u6a21\u5757\u8fd8\u53ef\u4ee5\u5728\u56fe\u50cf\u4e0a\u6dfb\u52a0\u6587\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">draw.text((10, 10), &quot;Hello&quot;, fill=&quot;white&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\u6211\u4eec\u5728\u56fe\u50cf\u7684\u5750\u6807(10,10)\u5904\u6dfb\u52a0\u4e86\u767d\u8272\u7684\u201cHello\u201d\u6587\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4fdd\u5b58\u56fe\u50cf\u4e3aJPG\u683c\u5f0f<\/h3>\n<\/p>\n<p><p>\u521b\u5efa\u548c\u4fee\u6539\u56fe\u50cf\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>save<\/code>\u65b9\u6cd5\u5c06\u5176\u4fdd\u5b58\u4e3aJPG\u683c\u5f0f\u3002Pillow\u4f1a\u81ea\u52a8\u5904\u7406\u683c\u5f0f\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">img.save(&#39;output.jpg&#39;, &#39;JPEG&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u56fe\u50cf\u4fdd\u5b58\u4e3a<code>output.jpg<\/code>\uff0c\u6307\u5b9a\u683c\u5f0f\u4e3aJPEG\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5b8c\u6574\u793a\u4f8b\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u4e00\u4e2aJPG\u56fe\u50cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import Image, ImageDraw<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684RGB\u56fe\u50cf<\/strong><\/h2>\n<p>img = Image.new(&#39;RGB&#39;, (100, 100), color=&#39;red&#39;)<\/p>\n<h2><strong>\u521d\u59cb\u5316ImageDraw\u5bf9\u8c61<\/strong><\/h2>\n<p>draw = ImageDraw.Draw(img)<\/p>\n<h2><strong>\u7ed8\u5236\u4e00\u4e2a\u77e9\u5f62<\/strong><\/h2>\n<p>draw.rectangle([10, 10, 90, 90], outline=&quot;black&quot;, fill=&quot;blue&quot;)<\/p>\n<h2><strong>\u6dfb\u52a0\u6587\u672c<\/strong><\/h2>\n<p>draw.text((10, 10), &quot;Hello&quot;, fill=&quot;white&quot;)<\/p>\n<h2><strong>\u4fdd\u5b58\u4e3aJPG\u683c\u5f0f<\/strong><\/h2>\n<p>img.save(&#39;output.jpg&#39;, &#39;JPEG&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5176\u4ed6\u56fe\u50cf\u5904\u7406\u529f\u80fd<\/h3>\n<\/p>\n<p><p>Pillow\u4e0d\u4ec5\u53ef\u4ee5\u521b\u5efa\u548c\u4fdd\u5b58\u56fe\u50cf\uff0c\u8fd8\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u5176\u4ed6\u56fe\u50cf\u5904\u7406\u529f\u80fd\uff0c\u5982\u56fe\u50cf\u88c1\u526a\u3001\u65cb\u8f6c\u3001\u7f29\u653e\u3001\u6ee4\u955c\u5e94\u7528\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1. \u56fe\u50cf\u88c1\u526a<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>crop<\/code>\u65b9\u6cd5\u5bf9\u56fe\u50cf\u8fdb\u884c\u88c1\u526a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">cropped_img = img.crop((10, 10, 90, 90))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u56fe\u50cf\u65cb\u8f6c<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>rotate<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5bf9\u56fe\u50cf\u8fdb\u884c\u65cb\u8f6c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">rotated_img = img.rotate(45)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u56fe\u50cf\u7f29\u653e<\/h4>\n<\/p>\n<p><p><code>resize<\/code>\u65b9\u6cd5\u53ef\u4ee5\u7528\u4e8e\u8c03\u6574\u56fe\u50cf\u5927\u5c0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">resized_img = img.resize((200, 200))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4. \u5e94\u7528\u6ee4\u955c<\/h4>\n<\/p>\n<p><p>Pillow\u63d0\u4f9b\u4e86\u591a\u79cd\u6ee4\u955c\uff0c\u53ef\u4ee5\u901a\u8fc7<code>ImageFilter<\/code>\u6a21\u5757\u5e94\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import ImageFilter<\/p>\n<p>filtered_img = img.filter(ImageFilter.BLUR)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Python\u548cPillow\u5e93\u521b\u5efaJPG\u56fe\u50cf\u3002\u4ece\u5b89\u88c5\u5e93\u3001\u521b\u5efa\u56fe\u50cf\u3001\u7ed8\u5236\u5f62\u72b6\u3001\u6dfb\u52a0\u6587\u672c\uff0c\u5230\u6700\u7ec8\u4fdd\u5b58\u56fe\u50cf\u4e3aJPG\u683c\u5f0f\uff0c\u6211\u4eec\u4e00\u6b65\u6b65\u5730\u5c55\u793a\u4e86\u6574\u4e2a\u6d41\u7a0b\u3002\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u4ecb\u7ecd\u4e86\u4e00\u4e9b\u5176\u4ed6\u56fe\u50cf\u5904\u7406\u529f\u80fd\uff0c\u5982\u88c1\u526a\u3001\u65cb\u8f6c\u3001\u7f29\u653e\u548c\u5e94\u7528\u6ee4\u955c\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u77e5\u8bc6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528Python\u8fdb\u884c\u5404\u79cd\u56fe\u50cf\u5904\u7406\u4efb\u52a1\uff0c\u5236\u4f5c\u548c\u4fee\u6539\u56fe\u50cf\u4ee5\u6ee1\u8db3\u60a8\u7684\u9700\u6c42\u3002Pillow\u5e93\u529f\u80fd\u5f3a\u5927\u4e14\u6613\u4e8e\u4f7f\u7528\uff0c\u662fPython\u4e2d\u5904\u7406\u56fe\u50cf\u7684\u9996\u9009\u5de5\u5177\u4e4b\u4e00\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u5c06\u5176\u4ed6\u683c\u5f0f\u7684\u56fe\u7247\u8f6c\u6362\u4e3aJPG\uff1f<\/strong><br \/>\u4f7f\u7528Python\uff0c\u60a8\u53ef\u4ee5\u5229\u7528Pillow\u5e93\u8f7b\u677e\u5730\u5c06\u5176\u4ed6\u683c\u5f0f\u7684\u56fe\u7247\uff08\u5982PNG\u3001GIF\u7b49\uff09\u8f6c\u6362\u4e3aJPG\u683c\u5f0f\u3002\u53ea\u9700\u5bfc\u5165\u5e93\uff0c\u52a0\u8f7d\u6e90\u56fe\u7247\uff0c\u4f7f\u7528<code>.convert(&#39;RGB&#39;)<\/code>\u65b9\u6cd5\u8f6c\u6362\u989c\u8272\u6a21\u5f0f\uff0c\u7136\u540e\u4fdd\u5b58\u4e3aJPG\u6587\u4ef6\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">from PIL import Image\n\n# \u52a0\u8f7d\u56fe\u7247\nimg = Image.open(&#39;image.png&#39;)\n# \u8f6c\u6362\u4e3aRGB\u6a21\u5f0f\nimg = img.convert(&#39;RGB&#39;)\n# \u4fdd\u5b58\u4e3aJPG\u683c\u5f0f\nimg.save(&#39;image.jpg&#39;, &#39;JPEG&#39;)\n<\/code><\/pre>\n<p><strong>Python\u4e2d\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u5e93\u6765\u5904\u7406JPG\u56fe\u7247\uff1f<\/strong><br \/>\u5904\u7406JPG\u56fe\u7247\u7684\u5e93\u6709\u5f88\u591a\uff0c\u6700\u5e38\u7528\u7684\u5305\u62ecPillow\u3001OpenCV\u548cimageio\u3002Pillow\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u56fe\u50cf\u5904\u7406\u5e93\uff0c\u9002\u5408\u8fdb\u884c\u57fa\u672c\u7684\u56fe\u50cf\u64cd\u4f5c\uff0c\u5982\u6253\u5f00\u3001\u4fdd\u5b58\u3001\u7f29\u653e\u548c\u526a\u88c1\u3002OpenCV\u5219\u66f4\u9002\u5408\u8fdb\u884c\u590d\u6742\u7684\u56fe\u50cf\u5904\u7406\u548c\u8ba1\u7b97\u673a\u89c6\u89c9\u4efb\u52a1\uff0c\u800cimageio\u5219\u652f\u6301\u591a\u79cd\u683c\u5f0f\u7684\u56fe\u50cf\u8bfb\u5199\uff0c\u9002\u5408\u5feb\u901f\u5904\u7406\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u8c03\u6574JPG\u56fe\u7247\u7684\u8d28\u91cf\uff1f<\/strong><br \/>\u60a8\u53ef\u4ee5\u4f7f\u7528Pillow\u5e93\u6765\u8c03\u6574JPG\u56fe\u7247\u7684\u8d28\u91cf\u3002\u4fdd\u5b58\u56fe\u7247\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e<code>quality<\/code>\u53c2\u6570\u6765\u6307\u5b9a\u8f93\u51fa\u56fe\u7247\u7684\u8d28\u91cf\uff0c\u8303\u56f4\u662f1\u5230100\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">img.save(&#39;image_quality.jpg&#39;, &#39;JPEG&#39;, quality=85)\n<\/code><\/pre>\n<p>\u8fd9\u4e2a\u793a\u4f8b\u5c06\u56fe\u7247\u4ee585%\u7684\u8d28\u91cf\u4fdd\u5b58\uff0c\u4ece\u800c\u5728\u6587\u4ef6\u5927\u5c0f\u548c\u56fe\u50cf\u8d28\u91cf\u4e4b\u95f4\u627e\u5230\u4e00\u4e2a\u5e73\u8861\u3002\u9002\u5f53\u8c03\u6574\u8d28\u91cf\u53c2\u6570\u53ef\u4ee5\u6709\u6548\u63a7\u5236\u6587\u4ef6\u5927\u5c0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5236\u4f5cJPG\u56fe\u50cf\u7684\u8fc7\u7a0b\u53ef\u4ee5\u901a\u8fc7Python\u4e2d\u7684PIL\uff08Python Imaging Library\uff09\u5e93\u6765\u5b9e\u73b0\u3001P [&hellip;]","protected":false},"author":3,"featured_media":944295,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/944293"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=944293"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/944293\/revisions"}],"predecessor-version":[{"id":944296,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/944293\/revisions\/944296"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/944295"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=944293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=944293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=944293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}