Javascript/JQuery 图像切割器

发布于 2024-10-08 06:00:33 字数 243 浏览 0 评论 0原文

好吧,我的最后一个问题没有得到答复。我想我没有问我应该做的事情。

基本上我的要求与此类似使用Javascript以编程方式剪辑/剪切图像

但是遵循该链接将导致图像任何部分的矩形视图,但我想将其剪切到任何方向(多边形)。这可能吗?

Okay my last question got no response. I think I didn't ask the way I should do.

Basically my requirement is similar to this one Programmatically Clip/Cut image using Javascript

But following that link will result in a rectangle view of any portion of the image but I want to clip it any direction (polygon). Would that be possible?

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

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

发布评论

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

评论(1

假装爱人 2024-10-15 06:00:33

没有一个好方法可以使用 HTML 4 DOM 制作任意多边形形状。如果你使用画布,我会说你可以这样做。您的另一个选择是在顶部放置一个透明的 png(对于 IE6 则为 gif),然后在其下方放置图像,并且绝对定位与您引用的其他答案类似。

There is not a good way to make an arbitrary polygon shape with the HTML 4 DOM. If you were using canvas I'd say you could do it that way. Your other option would be to just have a transparent png (and gif for IE6) on top and then the image underneath that and absolute positioned similarly to the other answer you referenced.

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