{"id":260,"date":"2026-10-30T18:43:15","date_gmt":"2026-10-30T10:43:15","guid":{"rendered":"http:\/\/laoke.pw\/?p=260"},"modified":"2026-10-30T18:43:15","modified_gmt":"2026-10-30T10:43:15","slug":"222-imagemagick-%e4%b8%80%e8%a1%8c%e5%91%bd%e4%bb%a4%e6%89%b9%e5%a4%84%e7%90%86%e4%b8%8a%e5%8d%83%e5%bc%a0%e5%9b%be%ef%bc%8c%e7%a8%8b%e5%ba%8f%e5%91%98%e7%9a%84%e4%bf%ae%e5%9b%be","status":"publish","type":"post","link":"https:\/\/laoke.pw\/?p=260","title":{"rendered":"222 ImageMagick \u2014\u2014 \u4e00\u884c\u547d\u4ee4\u6279\u5904\u7406\u4e0a\u5343\u5f20\u56fe\uff0c\u7a0b\u5e8f\u5458\u7684\u4fee\u56fe\u795e\u5668"},"content":{"rendered":"<h2>\u4e00\u53e5\u8bdd\u5b9a\u4f4d<\/h2>\n<p>ImageMagick \u662f\u4e00\u6b3e\u514d\u8d39\u5f00\u6e90\u7684\u547d\u4ee4\u884c\u56fe\u50cf\u5904\u7406\u5957\u4ef6\uff0cWindows \/ macOS \/ Linux \u5168\u5e73\u53f0\u53ef\u7528\uff0c\u4ece\u8f6c\u683c\u5f0f\u3001\u7f29\u653e\u5230\u52a0\u6ee4\u955c\u5408\u6210\uff0c\u4e00\u5f20\u547d\u4ee4\u641e\u5b9a\u6210\u767e\u4e0a\u5343\u5f20\u56fe\u7247\u3002<\/p>\n<h2>\u5b83\u89e3\u51b3\u4ec0\u4e48\u75db\u70b9<\/h2>\n<p>\u624b\u4e0a\u6709\u4e00\u5343\u5f20\u4ea7\u54c1\u56fe\u8981\u7edf\u4e00\u538b\u7f29\u5230\u6307\u5b9a\u5c3a\u5bf8\uff0c\u7528\u56fe\u5f62\u754c\u9762\u5de5\u5177\u4e00\u5f20\u5f20\u62d6\uff1f\u6539\u4e00\u4e2a\u9700\u6c42\u53c8\u5168\u90e8\u91cd\u6765\uff1f\u8fd9\u7c7b&quot;\u91cd\u590d \u00d7 \u6d77\u91cf&quot;\u7684\u56fe\u7247\u4efb\u52a1\uff0c\u56fe\u5f62\u754c\u9762\u5929\u7136\u65e0\u89e3\u3002ImageMagick \u628a\u6240\u6709\u56fe\u7247\u64cd\u4f5c\u90fd\u53d8\u6210\u4e00\u884c\u547d\u4ee4\uff1a\u547d\u4ee4\u53ef\u4ee5\u5199\u8fdb\u811a\u672c\u3001\u5b9a\u65f6\u4efb\u52a1\u3001CI \u6d41\u7a0b\uff0c\u53c2\u6570\u968f\u65f6\u53ef\u6539\u3001\u7ed3\u679c\u5b8c\u5168\u53ef\u590d\u73b0\u3002\u5b83 1990 \u5e74\u5c31\u8bde\u751f\u4e86\uff0c\u4e09\u5341\u591a\u5e74\u8fc7\u53bb\u4ecd\u662f\u5f00\u53d1\u8005\u5904\u7406\u56fe\u7247\u7684\u9ed8\u8ba4\u7b54\u6848\u3002<\/p>\n<h2>\u6838\u5fc3\u80fd\u529b<\/h2>\n<ul>\n<li><strong>\u683c\u5f0f\u901a\u5403<\/strong>\uff1a\u652f\u6301 200 \u591a\u79cd\u56fe\u50cf\u683c\u5f0f\uff0cPNG\u3001JPEG\u3001WebP\u3001HEIC\u3001TIFF\u3001PDF\u3001SVG\u3001GIF \u4e92\u8f6c\u90fd\u662f\u4e00\u53e5\u8bdd\u7684\u4e8b\u3002<\/li>\n<li><strong>\u6279\u91cf\u7f29\u653e\u538b\u7f29<\/strong>\uff1a<code>magick mogrify -resize 1600x -quality 85 *.jpg<\/code> \u4e00\u884c\u547d\u4ee4\u628a\u76ee\u5f55\u91cc\u6240\u6709\u56fe\u7247\u7f29\u653e\u5e76\u91cd\u65b0\u538b\u7f29\u3002<\/li>\n<li><strong>\u5408\u6210\u4e0e\u6c34\u5370<\/strong>\uff1a\u7ed9\u56fe\u7247\u6279\u91cf\u52a0\u6c34\u5370\u3001\u62fc\u56fe\u3001\u52a0\u5706\u89d2\u3001\u751f\u6210\u7f29\u7565\u56fe\uff0c\u90fd\u80fd\u7528\u547d\u4ee4\u8868\u8fbe\u3002<\/li>\n<li><strong>GIF \u4e0e\u52a8\u753b<\/strong>\uff1a\u53ef\u4ee5\u628a\u591a\u5f20\u56fe\u5408\u6210 GIF\u3001\u62bd\u53d6 GIF \u5e27\u3001\u8c03\u6574\u64ad\u653e\u901f\u5ea6\u3002<\/li>\n<li><strong>\u811a\u672c\u53cb\u597d<\/strong>\uff1a\u63d0\u4f9b\u547d\u4ee4\u884c\u3001C\u3001Python\uff08Wand\uff09\u3001Node.js \u7b49\u591a\u79cd\u8c03\u7528\u65b9\u5f0f\uff0c\u9002\u5408\u5d4c\u5165\u81ea\u52a8\u5316\u6d41\u7a0b\u3002<\/li>\n<\/ul>\n<h2>\u5b9e\u6d4b\u4f53\u9a8c<\/h2>\n<p>\u5b9e\u6d4b\u4e00\u4e2a 1.2 GB\u3001\u5171 950 \u5f20 JPG \u7684\u76ee\u5f55\uff0c\u6267\u884c mogrify \u6279\u91cf\u7f29\u653e\u5230 1600 \u50cf\u7d20\u5bbd\u3001\u8d28\u91cf 85\uff0c\u5168\u90e8\u5b8c\u6210\u7528\u65f6\u7ea6 1 \u5206 40 \u79d2\uff0c\u8f93\u51fa\u4f53\u79ef\u964d\u5230\u7ea6 210 MB\uff0c\u8089\u773c\u51e0\u4e4e\u770b\u4e0d\u51fa\u753b\u8d28\u5dee\u5f02\u3002\u540c\u4e00\u6279\u4efb\u52a1\u7528\u67d0\u56fe\u5f62\u754c\u9762\u5de5\u5177\u64cd\u4f5c\uff0c\u5149\u9010\u5f20\u8bbe\u7f6e\u5c31\u82b1\u4e86\u4e09\u500d\u65f6\u95f4\u3002\u8f6c\u6362 HEIC \u5230 JPG\u3001\u628a 20 \u5f20\u622a\u56fe\u62fc\u6210\u4e00\u5f20\u6a2a\u5411\u957f\u56fe\uff0c\u4e5f\u90fd\u662f\u4e00\u884c\u547d\u4ee4\u7684\u4e8b\u3002Windows \u5b98\u65b9\u5b89\u88c5\u5305\u7ea6 30 MB\uff0c\u88c5\u5b8c\u5728\u4efb\u610f\u76ee\u5f55\u6253\u5f00\u7ec8\u7aef\u5373\u53ef\u4f7f\u7528\u3002\u5b66\u4e60\u66f2\u7ebf\u786e\u5b9e\u5b58\u5728\uff1a<code>-resize<\/code>\u3001<code>-quality<\/code>\u3001<code>-gravity<\/code> \u8fd9\u4e9b\u53c2\u6570\u7b2c\u4e00\u6b21\u770b\u50cf\u5929\u4e66\uff0c\u4f46\u5e38\u7528\u7684\u5c31\u5341\u6765\u4e2a\uff0c\u7167\u7740\u4f8b\u5b50\u6539\u6570\u5b57\u5f88\u5feb\u5c31\u80fd\u4e0a\u624b\u3002<\/p>\n<h2>\u9002\u5408\u8c01<\/h2>\n<ul>\n<li>\u9700\u8981\u6279\u91cf\u5904\u7406\u56fe\u7247\u7684\u5f00\u53d1\u8005\u3001\u7ad9\u957f\u3001\u7535\u5546\u5356\u5bb6<\/li>\n<li>\u8981\u628a\u56fe\u7247\u5904\u7406\u5d4c\u5165\u811a\u672c\u6216\u81ea\u52a8\u5316\u6d41\u7a0b\u7684\u6280\u672f\u7528\u6237<\/li>\n<li>\u8ffd\u6c42\u53ef\u590d\u73b0\u3001\u53ef\u4fee\u6539\u53c2\u6570\u7684\u91cd\u5ea6\u56fe\u7247\u5de5\u4f5c\u8005<\/li>\n<\/ul>\n<h2>\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9<\/h2>\n<ul>\n<li>\u7eaf\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u6ca1\u6709\u56fe\u5f62\u754c\u9762\uff0c\u5b8c\u5168\u96f6\u57fa\u7840\u7684\u7528\u6237\u5efa\u8bae\u4ece mogrify \u7684\u51e0\u4e2a\u5e38\u7528\u547d\u4ee4\u5b66\u8d77\u3002<\/li>\n<li>\u547d\u4ee4\u5199\u9519\u53c2\u6570\u4f1a\u76f4\u63a5\u8986\u76d6\u539f\u56fe\uff0c\u6279\u91cf\u64cd\u4f5c\u524d\u52a1\u5fc5\u5907\u4efd\uff0c\u6216\u5148\u7528 <code>-path<\/code> \u8f93\u51fa\u5230\u65b0\u76ee\u5f55\u3002<\/li>\n<li>\u5904\u7406\u8d85\u5927\u56fe\uff08\u6570\u4ebf\u50cf\u7d20\uff09\u65f6\u6ce8\u610f\u5185\u5b58\u5360\u7528\u3002<\/li>\n<\/ul>\n<h2>\u5c0f\u7ed3<\/h2>\n<p>ImageMagick \u4e0d\u9002\u5408\u8ffd\u6c42&quot;\u6240\u89c1\u5373\u6240\u5f97&quot;\u7684\u8f7b\u5ea6\u7528\u6237\uff0c\u4f46\u5bf9\u4efb\u4f55\u9700\u8981\u548c\u6279\u91cf\u56fe\u7247\u6253\u4ea4\u9053\u7684\u4eba\u6765\u8bf4\uff0c\u5b83\u5c31\u662f\u6548\u7387\u7684\u4ee3\u540d\u8bcd\uff1a\u4e00\u6b21\u5b66\u4f1a\uff0c\u7ec8\u8eab\u53d7\u76ca\uff0c\u4e09\u5341\u5e74\u7684\u7a33\u5b9a\u7ef4\u62a4\u66f4\u662f\u96be\u5f97\u7684\u5b9a\u5fc3\u4e38\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ImageMagick \u662f\u4e00\u6b3e\u514d\u8d39\u5f00\u6e90\u7684\u547d\u4ee4\u884c\u56fe\u50cf\u5904\u7406\u5957\u4ef6\uff0cWindows \/ macOS \/ Linux \u5168\u5e73\u53f0\u53ef\u7528\uff0c\u4ece\u8f6c\u683c\u5f0f\u3001\u7f29\u653e\u5230\u52a0\u6ee4\u955c\u5408\u6210\uff0c\u4e00\u5f20\u547d\u4ee4\u641e\u5b9a\u6210\u767e\u4e0a\u5343\u5f20\u56fe\u7247\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"class_list":["post-260","post","type-post","status-publish","format-standard","hentry","category-2"],"_links":{"self":[{"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts\/260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260"}],"version-history":[{"count":0,"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions"}],"wp:attachment":[{"href":"https:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}