gpt4 book ai didi

c# - 在 Windows 应用商店应用程序中组合位图图像的最简单方法是什么

转载 作者:行者123 更新时间:2023-11-28 03:11:11 26 4
gpt4 key购买 nike

我正在尝试开发一个 Windows 应用商店应用程序,它生成并保存由各种图像、原始形状和文本组成的位图图像。我不一定希望所有图像都显示在屏幕上,因为我可能需要生成很 multimap 像。我的应用程序是用 C# 编写的。我看到 Microsoft 在 Windows 8.1 中引入了一个新的 RenderTargetBitmap 类——我打算将其定位——但它只保存屏幕上的 XAML 树。是我使用 C++ 的唯一选择吗?如果是,哪个 C++ 库是免费的、与 WinRT 兼容并具有简单的 API?

最佳答案

看看WriteableBitmap .它允许您在图像中手动绘制像素,方法是首先将它们写入字节数组。

如果您需要其他工具来渲染形状等,WriteableBitmapEx可以是一个不错的选择。从链接引用:

The WriteableBitmap API is very minimalistic and there's only the raw Pixels array for such operations. The WriteableBitmapEx library tries to compensate that with extensions methods that are easy to use like built in methods and offer GDI+ like functionality. The library extends the WriteableBitmap class with elementary and fast (2D drawing) functionality, conversion methods and functions to combine (blit) WriteableBitmaps.

关于c# - 在 Windows 应用商店应用程序中组合位图图像的最简单方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18432637/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com