英文:
Converting canvas image from webpage to SVG
问题
我想从我的Instagram页面获取QR码,但只能以png格式下载,然后将其转换为SVG格式。是否有办法实现这个目标?我页面上唯一可用的代码是带有CSS类的canvas元素:
英文:
I'd like to grab the QR code from my Instagram page, which is only available for download as png and convert it to SVG. Is there a way to accomplish this? The only code I have to work with on the page is the canvas element with CSS classes:
<canvas class="x1xux3cy xc6p2dh" width="235" height="270"></canvas>
答案1
得分: 1
是的。一个QR码(通常)包含/编码了一个链接。所以你只需要解码你的光栅QR码来获取这个链接,然后创建一个新的矢量QR码包含它。新的QR码可能不会看起来完全相同,但它将指向相同的目标,我想这实际上是你需要的全部。
英文:
Yes. A QR code (typically) contains/encodes a link. So you just need to decode your raster QR code to obtain this link, then create a new vector QR code containing it. The new QR code might not look exactly the same, but it will point to the same destination, which I presume is all you actually need.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论