{"id":10006185,"date":"2022-08-12T11:10:45","date_gmt":"2022-08-12T03:10:45","guid":{"rendered":"https:\/\/ityet.com\/?p=10006185"},"modified":"2022-08-12T11:10:45","modified_gmt":"2022-08-12T03:10:45","slug":"%e5%9b%be%e7%89%87%e4%b8%8a%e7%9a%84%e6%96%87%e5%ad%97%e6%a8%a1%e7%b3%8a%e9%9a%be%e8%be%a8%ef%bc%8c%e6%80%8e%e4%b9%88%e6%89%8d%e8%83%bd%e4%b8%80%e9%94%ae%e5%8f%98%e6%b8%85%e6%99%b0%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006185","title":{"rendered":"\u56fe\u7247\u4e0a\u7684\u6587\u5b57\u6a21\u7cca\u96be\u8fa8\uff0c\u600e\u4e48\u624d\u80fd\u4e00\u952e\u53d8\u6e05\u6670\uff1f"},"content":{"rendered":"<p>\u56fe\u50cf\u4e2d\u7684\u6587\u5b57\u5185\u5bb9\u901a\u5e38\u5305\u542b\u4e86\u5f88\u91cd\u8981\u7684\u4fe1\u606f\uff0c\u7136\u800c\u7531\u4e8e\u62cd\u6444\u9650\u5236\u3001\u5206\u8fa8\u7387\u8fc7\u4f4e\u3001\u62cd\u6444\u5bf9\u8c61\u8fc7\u8fdc\u7b49\u7b49\u539f\u56e0\uff0c\u6587\u5b57\u5185\u5bb9\u53ef\u80fd\u6a21\u7cca\u4e0d\u6e05\u3002\u6bd4\u5982\u5728\u62cd\u7167\u4e0a\u4f20\u53d1\u7968\u65f6\uff0c\u56e0\u4e3a\u805a\u7126\u4e0d\u51c6\u3001\u706f\u5149\u7b49\u95ee\u9898\uff0c\u5bfc\u81f4App\u65e0\u6cd5\u81ea\u52a8\u8bc6\u522b\u53d1\u7968\u5185\u5bb9\uff1b\u4e00\u4e9b\u6863\u6848\u8981\u4e0a\u4f20\u5230\u540e\u53f0\u8d44\u6599\u5e93\u91cc\u65f6\uff0c\u7531\u4e8e\u5e74\u4ee3\u4e45\u8fdc\uff0c\u6709\u4e9b\u6587\u5b57\u5df2\u65e0\u6cd5\u8fa8\u8ba4\uff1b\u88ab\u4fdd\u5b58\u8f6c\u53d1\u591a\u6b21\u7684\u622a\u56fe\uff0c\u7531\u4e8e\u6bcf\u4e2a\u5e94\u7528\u538b\u7f29\u7a0b\u5ea6\u4e0d\u4e00\u6837\uff0c\u518d\u53d1\u9001\u7ed9\u670b\u53cb\u6216\u793e\u4ea4\u5e73\u53f0\u65f6\u53d8\u5f97\u6a21\u7cca\u4e0d\u6e05\u3002\u4e3a\u4e86\u63d0\u5347\u6587\u5b57\u5206\u8fa8\u7387\uff0c\u7ed9\u7528\u6237\u5e26\u6765\u826f\u597d\u7684\u4f7f\u7528\u4f53\u9a8c\uff0c\u534e\u4e3aHMS Core\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=mzItegq46NvQ1sfKLqr6Lg%3D%3D.vmrz6euYFyBDnKmXTFONTmHGjLUkIKchgFnXrAwtuxkHuK%2FHFN4KH435TALjsI%2FrCgwHsiRzRQXy5mR7N8HJGBuRQiRcUmBtIIYjtg41J9I%3D\" rel=\"nofollow\">\u673a\u5668\u5b66\u4e60\u670d\u52a1<\/a>\u6587\u5b57\u56fe\u50cf\u8d85\u5206\u8fa8\u7387\u80fd\u529b\u53ef\u4ee5\u5e2e\u5fd9\u3002<\/p>\n<h3>1.    \u4e1a\u52a1\u7b80\u4ecb<\/h3>\n<p>HMS Core<a href=\"https:\/\/link.segmentfault.com\/?enc=0DP7oalckor4qz8yU5HwsQ%3D%3D.OMYRp3rQJgIJbU5WtTSt3ufFXdF%2F0yUMPGi5q1vEIpydSB3vBSZHi1uQMMd7a7j%2BW9BTM%2FHfEu6jmoJrK33hsRNblM95JKk5eLtKOt1DGRU%3D\" rel=\"nofollow\">\u673a\u5668\u5b66\u4e60\u670d\u52a1<\/a>\u6587\u5b57\u56fe\u50cf\u8d85\u5206\u8fa8\u7387\u670d\u52a1\u53ef\u4ee5\u5bf9\u5305\u542b\u6587\u5b57\u5185\u5bb9\u7684\u56fe\u7247\u8fdb\u884c3\u500d\u653e\u5927\uff0c\u540c\u65f6\u663e\u8457\u589e\u5f3a\u56fe\u7247\u4e2d\u6587\u5b57\u7684\u6e05\u6670\u5ea6\u548c\u53ef\u8fa8\u8bc6\u5ea6\uff0c\u8f7b\u677e\u89e3\u51b3\u56fe\u7247\u4e2d\u6587\u5b57\u5206\u8fa8\u7387\u4f4e\u7684\u95ee\u9898\u3002<\/p>\n<p><strong>DEMO\u6f14\u793a<\/strong><\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc1Gjq\" alt=\"\" title=\"\" loading=\"lazy\"><br \/>\u8d85\u5206\u524d<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc1Gjr\" alt=\"\" title=\"\" loading=\"lazy\"><br \/>\u8d85\u5206\u540e<\/p>\n<h3>2.    \u573a\u666f\u4ecb\u7ecd<\/h3>\n<p>\u6587\u5b57\u56fe\u50cf\u8d85\u5206\u8fa8\u7387\u670d\u52a1\u5728\u751f\u6d3b\u4e2d\u6709\u5e7f\u6cdb\u5e94\u7528\u3002\u6709\u65f6\u5019\u6211\u4eec\u5728\u62cd\u7167\u65f6\uff0c\u7531\u4e8e\u8ddd\u79bb\u8fdc\u3001\u672a\u805a\u7126\u7b49\u539f\u56e0\uff0c\u5bfc\u81f4\u62cd\u6444\u6548\u679c\u4e0d\u7406\u60f3\uff0c\u62cd\u7167\u6216\u56fe\u50cf\u5904\u7406App\u53ef\u4ee5\u96c6\u6210\u4f7f\u7528\u8be5\u529f\u80fd\u3002\u800c\u5bf9\u4e8e\u4e00\u4e9b\u5e74\u4efd\u6bd4\u8f83\u4e45\u8fdc\u7684\u4e66\u7c4d\u6216\u6863\u6848\u4e0a\u7684\u6587\u5b57\u5185\u5bb9\u65e5\u6e10\u6a21\u7cca\u4e0d\u6613\u8fa8\u8ba4\uff0c\u53c8\u9700\u8981\u4e0a\u4f20\u5230\u8d44\u6599\u5e93\u91cc\u7684\uff0c\u53ef\u4ee5\u5728\u81ea\u8eab\u7684App\u91cc\u96c6\u6210\uff0c\u6bd4\u5982\u56fe\u4e66\u9986\u3001\u7535\u5b50\u4e66\u7b49App\uff0c\u589e\u5f3a\u56fe\u7247\u4e2d\u6587\u5b57\u7684\u6e05\u6670\u5ea6\uff0c\u63d0\u5347\u6587\u5b57\u7684\u53ef\u8bc6\u522b\u5ea6\uff0c\u8ba9\u77e5\u8bc6\u6c38\u4e45\u7559\u5b58\u3002<\/p>\n<h3>3.    \u529f\u80fd\u7279\u70b9<\/h3>\n<p><strong>\u6548\u679c\u660e\u663e<\/strong>\uff1a\u5bf9\u5305\u542b\u6587\u5b57\u5185\u5bb9\u7684\u56fe\u7247\u8fdb\u884c3\u500d\u653e\u5927\uff0c\u5e38\u89c1\u7684jpg\u538b\u7f29\u6216\u8005\u4e0b\u91c7\u6837\u56fe\u50cf\u8d85\u5206\u6548\u679c\u660e\u663e\u3002<\/p>\n<p><strong>\u5feb\u901f<\/strong>\uff1a\u76ee\u524d\u8be5\u7b97\u6cd5\u57fa\u4e8e\u6df1\u5ea6\u795e\u7ecf\u7f51\u7edc\u5f00\u53d1\uff0c\u5145\u5206\u5229\u7528\u534e\u4e3a\u624b\u673a\u7684NPU\u82af\u7247\uff0c\u5bf9\u795e\u7ecf\u7f51\u7edc\u8fdb\u884c\u52a0\u901f\uff0c\u52a0\u901f\u6bd4\u80fd\u8fbe\u523010\u500d\u4ee5\u4e0a\u3002<\/p>\n<p><strong>\u8f7b\u4fbf<\/strong>\uff1a\u5229\u7528\u672cAPI\uff0c\u53ef\u4ee5\u5927\u5927\u8282\u7701\u7b97\u6cd5\u5f00\u53d1\u7684\u65f6\u95f4\uff0c\u8282\u7701\u7b97\u6cd5\u6a21\u578b\u5360\u7528\u7684ROM\u7a7a\u95f4\uff0c\u8ba9\u60a8\u7684\u5e94\u7528\u66f4\u52a0\u8f7b\u4fbf\u3002<\/p>\n<h3>4.    \u6ce8\u610f\u4e8b\u9879<\/h3>\n<p>\u2022    \u4f7f\u7528\u6587\u5b57\u56fe\u50cf\u8d85\u5206\u53d8\u7387\u670d\u52a1\u524d\u9700\u8981\u5c06\u56fe\u7247\u8f6c\u5316\u4e3aARGB\u683c\u5f0f\u7684bitmap\uff0c\u7ecf\u8fc7\u8be5\u670d\u52a1\u5904\u7406\u540e\u8f93\u51faARGB\u683c\u5f0fbitmap\u3002<\/p>\n<p>\u2022    \u5bf9\u4e8e\u5e38\u89c1\u7684jpg\u538b\u7f29\u6216\u8005\u4e0b\u91c7\u6837\u56fe\u50cf\u8d85\u5206\u6548\u679c\u66f4\u660e\u663e\uff0c\u5bf9\u8f93\u5165\u56fe\u50cf\u6e05\u6670\u5ea6\u8f83\u597d\u7684\u56fe\u7247\uff0c\u6548\u679c\u53ef\u80fd\u4e0d\u660e\u663e\u3002<\/p>\n<p>\u2022    \u6587\u5b57\u56fe\u50cf\u8d85\u5206\u8fa8\u7387\u670d\u52a1\u8981\u6c42\u8f93\u5165\u7684\u56fe\u7247\u6700\u5927\u5206\u8fa8\u7387\u4e3a800px*800px\uff0c\u8f93\u5165\u56fe\u7247\u6700\u5c0f\u5c3a\u5bf8\u7684\u957f\u8fb9\u4e0d\u5c0f\u4e8e64px\u3002<\/p>\n<p><strong>\u4e86\u89e3\u66f4\u591a\u8be6\u60c5&gt;&gt;<\/strong><\/p>\n<p>\u8bbf\u95ee<a href=\"https:\/\/link.segmentfault.com\/?enc=%2B%2Bc8%2BuzQX3fNTp%2FhJGyO1w%3D%3D.%2FSNjgtkPwg7GaaUXOf8JUUV9ognJEA9r8Pa5bXCDcjxKJWZkzwrB1pMDNQ8F8OfxrS8N0KTebYaURxrZqdrzzA%3D%3D\" rel=\"nofollow\">\u534e\u4e3a\u5f00\u53d1\u8005\u8054\u76df\u5b98\u7f51<\/a>  <br \/>\u83b7\u53d6<a href=\"https:\/\/link.segmentfault.com\/?enc=mUnTDr4gaXFAEaBKET663A%3D%3D.qakjGCYHnETx8LcMS%2F6Mrb3HIdWfOxSk8nq8%2BQv%2B0FkCBguhJ1zUwutNMq%2FkhFBG01x4pSsiHvtR2BuuEKWxqSe%2Fn0TO%2FuziUyrWjaII6Vs%3D\" rel=\"nofollow\">\u5f00\u53d1\u6307\u5bfc\u6587\u6863<\/a>  <br \/>\u534e\u4e3a\u79fb\u52a8\u670d\u52a1\u5f00\u6e90\u4ed3\u5e93\u5730\u5740\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=SGaOGLVwCGycncN5orwHoQ%3D%3D.5rf5Taw9eZ5Jsk58VgHRXjkQNcZfaM67exDEamgdKDE%3D\" rel=\"nofollow\">GitHub<\/a>\u3001<a href=\"https:\/\/link.segmentfault.com\/?enc=iuCKJD4JhmldP0qBNLxPmw%3D%3D.o6ns7GyWN8cTwRZbffE7ZGiKR9YDSEHzdab%2FdKQaPvc%3D\" rel=\"nofollow\">Gitee<\/a><\/p>\n<p><strong>\u5173\u6ce8\u6211\u4eec\uff0c\u7b2c\u4e00\u65f6\u95f4\u4e86\u89e3 HMS Core \u6700\u65b0\u6280\u672f\u8d44\u8baf~<\/strong><\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042307640\">https:\/\/segmentfault.com\/a\/1190000042307640<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56fe\u50cf\u4e2d\u7684\u6587\u5b57\u5185\u5bb9\u901a\u5e38\u5305\u542b\u4e86\u5f88\u91cd\u8981\u7684\u4fe1\u606f\uff0c\u7136\u800c\u7531\u4e8e\u62cd\u6444\u9650\u5236\u3001\u5206\u8fa8\u7387\u8fc7\u4f4e\u3001\u62cd\u6444\u5bf9\u8c61\u8fc7\u8fdc\u7b49\u7b49\u539f\u56e0\uff0c\u6587\u5b57\u5185\u5bb9\u53ef\u80fd\u6a21\u7cca\u4e0d [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006185","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006185"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006185\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}