防止用户访问 SVG

发布于 2024-12-15 03:05:46 字数 326 浏览 2 评论 0原文

我正在制作一个完全由客户艺术组成的移动版网页。对于老式桌面版本,我只使用 PNG,但我真的很想在移动设备上使用 SVG。 SVGZ 会更小并且与分辨率无关,因此它看起来是一个完美的用例。

但客户担心,一旦他的艺术作品以 SVG 形式在线发布,任何人都可以下载这些文件并非法使用他的艺术作品(他以前制作过盗版作品,所以他非常重视这一点。)我从来没有想到过这一点,直到他提出了这个问题,但 SVG 基本上是他的原始源艺术。

我想知道是否有任何方法可以阻止用户访问 SVG 文件。据我所知这是不可能的——让文件可供用户代理使用意味着让它们可供用户使用——但我想四处询问以确定。

感谢您的任何帮助。

I'm putting together a mobile version of a webpage which consists entirely of client art. For the old-fashioned desktop version, I just used PNGs, but I really wanted to use SVG for mobile. SVGZ would be smaller and resolution independent, so it seemed like a perfect use case.

But the client is worried that, once his art is online in SVG, anyone could download the files and use his art illegally (he's had stuff he worked on pirated before, so he takes this pretty seriously.) This had never occurred to me until he brought it up, but the SVG would basically be his original source art.

I was wondering if there's any way to prevent the SVG files from being accessed by the user. As far I know this is impossible -- making the files available to the user-agent means making them available to the user -- but I wanted to ask around to be sure.

Thanks for any help.

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

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

发布评论

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

评论(1

九局 2024-12-22 03:05:46

不,这是不可能的。如果网络浏览器可以请求显示文件,那么任何地方的任何计算机都可以请求文件并保存直接结果。

提供故意降级的艺术品(例如光栅化)是阻止人们拥有原件的唯一方法。当然,心存疑虑的小偷仍然可以重新追踪 PNG 并获得与原始图像无关的矢量化、与分辨率无关的近似值。

您的客户也可以:

  • 在源代码中包含版权注释,证明所有权。 (是的,小偷可以删除这些。)
  • 包括“隐藏”元素(0% 不透明度或放置在另一个项目下),证明所有权。 (是的,小偷可以删除这些内容。)
  • 使用源 SVG 中的数据隐写术为其添加水印(例如,以足够小的方式改变路径中的十进制值,不会影响结果,但仍然嵌入自定义数据)。 (是的,任何怀疑这一点的小偷都可能会降低小数精度或以可能消除此精度的方式转换所有值。)
  • 相信法律会保护他的作品,或者在作品被盗时提供追索权。
  • 相信大多数人的善良不会这样做。
  • 认为盗窃是最真诚的奉承形式,不要担心。 :)

No, this is impossible. If a web browser can request the files for display, then any computer anywhere can request the files and save the direct results.

Serving up intentionally degraded artwork (e.g. rasterization) is the only way to prevent people from having the originals. Of course, a determined thief could still re-trace the PNG and get a vectorized, resolution-independent close approximation of the original.

Your client could alternatively:

  • Include copyright comments in the source, proving ownership. (Yes, a thief could delete these.)
  • Include 'hidden' elements (0% opacity or placed under another item), proving ownership. (Yes, a thief could delete these.)
  • Use data steganography in the source SVG to watermark it (e.g. vary the decimal values in a path in a manner minor enough to not effect the result, but still embed custom data). (Yes, any thief suspecting this could lower decimal precision or transform all values in a manner that might remove this.)
  • Trust in the law to protect his works, or provide a recourse if they are stolen.
  • Trust in the goodness of most of mankind to not do this.
  • Decide that theft is the sincerest form of flattery, and not worry about it. :)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文