设置/修改"BitmapImage"中的像素. [英] Set/Modify pixels in a "BitmapImage"

查看:400
本文介绍了设置/修改"BitmapImage"中的像素.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置或修改BitmapImage中的像素?

How do you set or modify a pixel in a BitmapImage?

推荐答案

自.Net 3.5 iirc起可以使用WritableBitmap. http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.aspx [ ^ ]
You can use WritableBitmap since .Net 3.5 iirc
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.aspx[^]


BitmapImage是WPF类,不是吗?您的问题未标记为WPF.

您可以阅读我的图像处理文章,了解如何使用GDI +.我知道您可以通过使用流在两者之间存储字节来在Bitmap和BitmapImage之间进行转换.我不确定是否可以访问BitmapImage的像素.
BitmapImage is a WPF class, isn''t it ? Your question is not tagged as WPF.

You can read my image processing articles for how to do it with GDI+. I know you can convert between Bitmap and BitmapImage by using a stream to store the bytes between the two. I am not sure it''s possible to access the pixels of a BitmapImage.


这篇关于设置/修改"BitmapImage"中的像素.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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