.NET 相当于 Java 的 MemoryImageSource

发布于 2024-07-07 01:26:52 字数 216 浏览 5 评论 0原文

我发现了一个很棒的开源 Java 程序,我正在将其翻译成 C#。 Visual Studio 中的内置翻译器让我开始使用,现在我花了大约一个月的时间逐行手动翻译其余部分。 我已经完成了 15,000 多行翻译,唯一剩下的就是尝试弄清楚如何将他们的 MemoryImageSource 内容转换为 C#/.NET。

实现这些东西的 .NET 等效方法是什么? 是否已有本机 .NET 库?

I found a wonderful open source Java program that I'm translating into C#. The built-in translator in Visual Studio got me started and I've now spent about a month translating the rest manually line by line. I've completed over 15,000 lines of translation and the only thing that remains is trying to figure out how to convert their MemoryImageSource stuff into C#/.NET.

What's the .NET equivalent way of implementing this stuff? Is there a native .NET library already?

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

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

发布评论

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

评论(2

只有影子陪我不离不弃 2024-07-14 01:26:52

标准 .NET System.Drawing。System.Drawing.dll 程序集中的Bitmap 类与我所了解的 MemoryImageSource (即,表示为可以操作的像素数组的图像)。

为了获得更好的性能,您可以使用 ImageTraverser类,它通过非托管指针访问数组。

The standard .NET System.Drawing.Bitmap class in the System.Drawing.dll assembly comes close to what I know of the MemoryImageSource (i.e., an image represented as an array of pixels that you can manipulate).

For better performance, you can use the ImageTraverser class from CodeProject, which accessses the array through unmanaged pointers.

So尛奶瓶 2024-07-14 01:26:52

查看 System.Drawing 命名空间。 这包装了标准的 Windows GDI+ 本机代码。

System.Drawing.BitMap 可能就是您想要的。

Look at the System.Drawing namespace. This wraps the standard windows GDI+ native code.

System.Drawing.BitMap is probably what you want.

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