有没有办法阻止用户从您的网站下载图像?

发布于 2024-09-10 17:14:23 字数 100 浏览 3 评论 0原文

我正在使用 asp.net,但愿意使用任何语言来执行此操作。我见过一些 javascript 可以做到这一点,但它们似乎很容易解决。

有没有可靠的方法来阻止用户下载图像?

I'm using asp.net but open to using any language for doing this. I've seen some javascripts that does this but they seem pretty easy to get around.

Is there a reliable way to keep users from downloading an image?

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

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

发布评论

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

评论(12

谎言 2024-09-17 17:14:24

不要把它放在网站上。

严重地。如果您将其发送给用户以将其显示给他们,那么他们就拥有该图像,从而可以保存该图像。依靠浏览器来执行某种策略将不可避免地以失败告终。如果您可以查看它,则可以复制它。音乐产业已经从惨痛的教训中吸取了教训。

Don't put it on the website.

Seriously. If you send it to the user to have it displayed to them, then they have the image, and can thus save the image. Relying on the browser to enforce some sort of policy will inevitably end in defeat. If you can view it, you can copy it. The music industry has been learning this lesson the hard way.

饮惑 2024-09-17 17:14:24

试图防止网站上的文件被复制就像试图防止水被弄湿一样。

Trying to prevent a file on a web site from being copied is like trying to prevent water from being wet.

神魇的王 2024-09-17 17:14:24

通过在表格中创建 1 像素图像的矩阵来提供图像。

即对于 1024x768 图形:

<table>
  <tr>
    <td><img src="1_1.png" height="1" width="1"></td>
    ....
    <td><img src="1_1024.png" height="1" width="1"></td>
  </tr>
  .... repeat x768
  <tr>
    <td><img src="1_768.png" height="1" width="1"></td>
    ....
    </td><img src="1024_768.png" height="1" width="1"></td>
  </tr>
 </table>

说真的,谁会想要组装 786432 个像素?

玩得开心! :P

Serve your images by creating a matrix of 1 pixel images in a table.

i.e. for a 1024x768 graphic:

<table>
  <tr>
    <td><img src="1_1.png" height="1" width="1"></td>
    ....
    <td><img src="1_1024.png" height="1" width="1"></td>
  </tr>
  .... repeat x768
  <tr>
    <td><img src="1_768.png" height="1" width="1"></td>
    ....
    </td><img src="1024_768.png" height="1" width="1"></td>
  </tr>
 </table>

Seriously, who is going to want to assemble 786432 pixels?

Have fun! :P

那片花海 2024-09-17 17:14:24

不,这是不可能的。我见过这样的脚本/黑客:

  • 将图像隐藏在其他图像后面
  • 禁用右键单击和键盘上的某些键(烦人)
  • 清理剪贴板(非常烦人)
  • 等等

但它们都不会阻止知识渊博的用户下载图像。

No, it's impossible. I have seen scripts/hacks that:

  • Hide images behind other images
  • Disable right clicks, and some keys on the keyboard (annoying)
  • Clean the clipboard (extremely annoying)
  • And more

But none of them will stop a reasonably knowledgeable user from downloading the images.

情绪失控 2024-09-17 17:14:24

不。在极端情况下,他们可以用数码相机拍摄屏幕照片并以这种方式拍摄图像。但即使按下 PrnScrn 通常也足以绕过最先进的技术。

No. In the extreme, they could just take a photo of the screen with a digital camera and take the image that way. But even pressing PrnScrn is usually enough to get around the most advanced techniques.

我喜欢麦丽素 2024-09-17 17:14:24

不。他们可以使用网络开发人员工具栏及其图像选项来查看所有图像路径,从而可以下载它。

No. They could use web developer toolbar and its image option to view all image paths thus they can download it..

止于盛夏 2024-09-17 17:14:24

真正的问题是:你为什么想要那个?

如果您允许用户查看图像,那么您不应该关心他们是否下载它。也许解决方案是限制对该图像的访问、为其添加水印或防止盗链(如果您担心的话)。

有一些方法可以让它变得更加困难,但正如许多人指出的那样,没有真正的方法来阻止它。

The real question is: Why would you want that?

If you're allowing the user to see the image, you shouldn't care if they download it. Maybe the solution is to restrict access to that image, watermark it, or prevent hotlinking if you're ever worried about that.

There are methods to make it more difficult, but as many have pointed, no real way to prevent it.

つ低調成傷 2024-09-17 17:14:24

使图像成为丑陋的原色绿色和洋红色闪烁动画,没有人会想复制它:-)

Make the image a hideous primary green and magenta flashing animation, and nobody will want to copy it :-)

紫罗兰の梦幻 2024-09-17 17:14:24

你能以某种方式将“图像”翻译成“电影”吗?无论是 GIF 动画、Flash 还是其他什么?

想象它被分成一个棋盘——然后你随机显示每个显示帧的 50% 的方块,并希望这足够快,足以欺骗眼睛看到一个坚实的图片......

我不会打赌,但是拥有足够的计算能力(在客户端),这似乎是一个可靠的想法。

即使您发布了算法,如果最终用户/潜在黑客无法获得随机数种子,您也应该没问题。

Can you somehow translate the "image" into a “movie”, whether an animated gif, flash or whatever?

Imagine it as divided into a checkerboard – and then you randomly display say 50% of the squares each displayed frame and hope that that is quick enough to fool the eye into seeing a solid picture ...

I wouldn't bet on it, but with enough computational power (at the client side) it seems like a solid idea.

Even if you publish your algorithm you should be ok if the end-user/potentail-hacker can't get at the random number seed.

诠释孤独 2024-09-17 17:14:24

您可以使用 http://www.swfir.com/ 或在 SWf 中显示图像并在 swf 中调用图像通过 XML。

You can use http://www.swfir.com/ or show images in SWf and call images in swf through XML.

姜生凉生 2024-09-17 17:14:24

如果您不希望复制您的图像,请不要显示它。哈哈哈,..

Don't display your images if you don't want it to be copied. Hahaha,..

无边思念无边月 2024-09-17 17:14:24

我很惊讶没有建议添加水印...只是一些带有您的姓名或网址的文本

I am suprised that no suggested adding a watermark ... just some text with your name or URL on it

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