将网页上的画布图像转换为SVG。

huangapple go评论74阅读模式
英文:

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码可能不会看起来完全相同,但它将指向相同的目标,我想这实际上是你需要的全部。

  1. 要将你的QR码解码为链接,请使用手机相机或类似这个的基于网络的解码器。
  2. 要从链接创建一个新的QR码并将其保存为SVG,请使用免费的基于网络的生成器,例如这个
英文:

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.

  1. To decode your QR code to a link, use your phone camera or a web-based decoder like this.
  2. To create a new QR code from a link and save it as SVG, use a free web-based generator like this.

huangapple
  • 本文由 发表于 2023年6月26日 08:52:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/76552957.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定