更改像素以填充 WPF 图像中的颜色

发布于 2024-08-08 20:57:02 字数 132 浏览 2 评论 0原文

我正在尝试填充 WPF 中的图像区域。类似于Paint中的水桶的东西。我该怎么做?我正在考虑获取鼠标下的像素颜色,并更改附近具有相同颜色的所有像素。有没有更简单的方法?

我应该用什么?可写位图?

谢谢

I'm trying to fill an area of an image in WPF. Something similar to the bucket in Paint. How should I do this? I'm thinking of getting the pixel color under the mouse, and change all the pixels with the same color near. Is there a simpler way?

What should I use? WriteableBitmap?

Thank you

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

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

发布评论

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

评论(1

想你只要分分秒秒 2024-08-15 20:57:02

是的,WriteableBitmap 是最好的恕我直言,这是继续下去的一种方式。

Yes, WriteableBitmap is the best way to go on this one IMHO.

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