谷歌图表API生成的二维码可以添加水印吗

发布于 2024-09-30 11:17:33 字数 85 浏览 2 评论 0原文

是否可以使用jquery或cakephp为googlecharts api生成的二维码添加水印。

我很感激任何帮助。

谢谢。

Is it possible to add watermark to QR code generated by google charts api using jquery or cakephp.

I appreciate any help.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

旧人哭 2024-10-07 11:17:33

我想唯一的方法是将谷歌图表生成的图像保存在您的服务器上,然后添加水印 vi GD 或 imagemagick。

I guess the only way to do that is saving the image generated by google charts on your server, and then add the watermark vi GD or imagemagick.

梦途 2024-10-07 11:17:33

我不会在二维码上加水印。相反,我可能会以某种方式在 QR 码中编码的数据上添加水印。

例如,如果您正在对 URL 进行编码,您是否可以将 URL 从“http://example.com/foo”更改为“http://example.com/foo?watermark-referrer=www-你的域名-com-什么”?然后仍然会显示该二维码是您的,但您不必冒损坏二维码图像本身的风险。

I wouldn't watermark a QR code. Instead, I'd probably watermark the data I was encoding in the QR code in some way.

For example, if you're encoding a URL, could you, for example, change the URL from "http://example.com/foo" to "http://example.com/foo?watermark-referrer=www-yourdomain-com-whatever"? Then there's still an indication that the QR code is yours, but you don't have to risk breaking the QR image itself.

软糯酥胸 2024-10-07 11:17:33

jQuery 选项是仅将水印图像放置在 Google Charts 制作的图像之上,但原始图像仍然可用。

PHP选项是通过curl请求生成QR图像,读取位图数据,通过GD或ImageMagick处理它,然后将其保存在某个地方并显示它。

不过,水印可能会干扰扫描算法,尤其是在使用不良相机读取时。

A jQuery option is to just place a watermark image on top of the one that Google Charts makes, but the original will still be available.

A PHP option is generate the QR image via a curl request, read the bitmap data in, muck with it via GD or ImageMagick, then save it somewhere and display it.

The watermark may interfere with a scanning algorithm, though, especially when read with a bad camera.

熊抱啵儿 2024-10-07 11:17:33

我认为你应该测试带有水印的二维码,因为很多读者很可能无法识别。

I think you should test the QR code with watermark, because there is a big chance that lots of reader won't recognize.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文