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SRxwZEt53tKFEmNXELDRMe1OIHHYRqvsYcJbtkzi6w4CJp3L57zlH97uwEiWEALGCMy32vV4KoExmiSgtwjMAqnHUwl6630y3BoCwatdj6cSWEOSBPUagSCQejyVoNfeJ+OtISAbG8oPpzebhmDNEBJECDSJgAykJnWgsgmB1iNAgdR6F5IBLiBAgeSCF0iH1iNAgdR6F5IBLiBAgeSCF0iH1iMgA+lvBpaY8KrFmshpI2/ztg9YedxMeFXLTeSY8FrWIQikbf4QVhLdUmVrpZEHeW0cTenQVLkqZg3psDocPmQDXtzvwOPzqjaUTHdFBx6x/11xHdZq+13uYokcptQtsptsi38R4bdx0ZQOTZWrYtaQDp7nXT+dgN9zF4rke0sL7OZwOLTu97brEA0k1ak4bGjKbkDWtfPsXZjo8BiW6R2rZJWmm9KhqXJVMBvSASe58ePjG0zwwO9c7Irl5cdrvD6/t1GH/wOb3Y6HxLNlqgAAAABJRU5ErkJggg==
创建一个img元素,监听img的onload事件,在onload事件中把图片渲染到canvas中,使用canvas转base64
可以参考:https://blog.csdn.net/wgh4318/article/details/126222541