[UWP]从byte []创建单色位图 [英] [UWP] Create Monochrome bitmap from byte[]

查看:89
本文介绍了[UWP]从byte []创建单色位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码:

 StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri(" ms-appx:/// Assets / test.bmp")); 

我需要通过将byte []转换为单色.bmp图像进一步修改此代码,将其保存到文件中,然后加载文件到这个存储文件。


我尝试过一些东西,但我无法将图像正确保存到文件中。


谢谢!


解决方案

嗨Bryson,


你可以使用LumiaImagingSDK来实现上面描述的内容。您可以按照链接
此处一步一步地进行操作。这是我制作的一个演示,然后是链接并运行良好。



最好的问候,


Neal Wang



I have the following code:

StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/test.bmp"));

I need to further modify this code by converting a byte[] to monochrome .bmp image, save it to a file, and then load the file to this storagefile.

I've tried a few things, but I cannot get the image to save properly to a file.

Thanks!

解决方案

Hi Bryson,

You can use LumiaImagingSDK to implement what you described above. You can follow the link here step by step. And this is a demo I made followed by the link and it runs well.

Best Regards,

Neal Wang


这篇关于[UWP]从byte []创建单色位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆