图像中获得WPF模糊 [英] Image in WPF getting Blurry

查看:160
本文介绍了图像中获得WPF模糊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用C#在WPF应用程序。我把图像在WrapPanel并显示出多一个边界网格内部和按钮使用图像也。问题是我的Image控件失去其质量。我不能在这里发表我的形象,所以我只是描述了这里。

I am developing an application in WPF using C#. I am putting Images in a WrapPanel and showing inside a Grid with one more Border and using images in Buttons also. Problem is my Image control loosing its quality. I am not able to post my image here so I am simply describing here.

我用 SnapsToDevicePixels =真的图像,但它仍然看起来模糊

I used SnapsToDevicePixels="True" for the images but still it looks blurry.

更新:

下面我分享下面的图片:

Here I shared the Image below:

推荐答案

我觉得马库斯告诉是解决您的问题,并通过添加一个更多的属性尝试的一种方式 RenderOptions.EdgeMode =别名为每个图像我的意思是:

I think what Markus told is the one way to resolve your issue and try by adding one more property in it RenderOptions.EdgeMode="Aliased" for each image I mean :

<Image Source="/LoginPanel;component/Icons/icoLogin.ico"
       RenderOptions.BitmapScalingMode="NearestNeighbor"
       RenderOptions.EdgeMode="Aliased"/>

如果您还没有能够解决你的问题,那么你可以参考这个的http://blogs.msdn.com/b/dwayneneed/archive/2007/10/05/blurry -bitmaps.aspx 创建一个自定义位图类,并应用在其上为您创造麻烦的所有图像。

if you still not able to fix your problem then you can refer this http://blogs.msdn.com/b/dwayneneed/archive/2007/10/05/blurry-bitmaps.aspx to create a custom Bitmap class and apply on all Images which are creating trouble for you.

您也可以看到这个的Stack溢出问题

这篇关于图像中获得WPF模糊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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