应用< Image.Effect>后如何获取BitmapImage字节 [英] How to get BitmapImage bytes after applying <Image.Effect>
本文介绍了应用< Image.Effect>后如何获取BitmapImage字节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这一个:
BitmapSource originalImage;
byte[] _originalPixels;
_originalPixels = new byte[(int) originalImage.Width*(int) originalImage.Height*4];
originalImage.CopyPixels(_originalPixels, 4*(int) originalImage.Width, 0);
在应用过滤器之前复制图像字节,这并不奇怪。
copies the image bytes before applying a filter and there is no surprising.
如何获取已应用效果的字节?
How to get bytes with an effect already applied?
如何以编程方式将着色器效果应用于byte []或某种低级像素结构数组?
How to apply shader effect programmatically to byte[] or some kind low level pixel structure array?
推荐答案
如何将图像渲染为 RenderTargetBitmap
并获取 RenderTargetBitmap
上使用 CopyPixels
的像素?它有帮助吗?
How about rendering your image to a RenderTargetBitmap
and getting the pixels using CopyPixels
on the RenderTargetBitmap
? Does it help?
这篇关于应用< Image.Effect>后如何获取BitmapImage字节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文