如何在WPF中提高图像清晰度 [英] How to improve Image clarity in WPF

查看:180
本文介绍了如何在WPF中提高图像清晰度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我如何提高图像清晰度.我正在从BitmapSoure加载图像.



how can i improve image clarity.I am loading image from BitmapSoure.

BitmapSource imgSource = Resources.Logo;
drawingContext.DrawImage(imgSource,new Rect(Sizes.Gutter + 10,Sizes.Margin + 10,100,30));


问候,
sajith


Regards,
sajith

推荐答案

您所能做的就是获得质量更好的源图像.是的,认真.

而且,如果这是照片,没有什么比在相机中直接拍摄清晰的图像更好的了.所有这些图像改进在后期制作中的有效性都被夸大了.只有裁剪才能接近完美.

您的WPF代码不会降低质量,但是您几乎无法提高质量.如果您要进行诸如锐化之类的复杂而自动化的图像处理,则不建议这样做.

如果您真的想在后处理中改善图像,请始终使用Photoshop或其他类似软件手动进行,并且前提是您是很好的润饰大师.开源GIMP( http://en.wikipedia.org/wiki/GIMP [ http: //www.gimp.org/ [ ^ ])很好,在某些特殊方面甚至更好.

—SA
All you can do is to get a source image of better quality. Yes, seriously.

Moreover, if this is the photograph, there is nothing better than taking the image of good clarity right in camera. The effectiveness of all those image improvements in post production is highly exaggerated. Only cropping can be nearly perfect.

Your WPF code does not degrade the quality, but you hardly can improve it. If you mean some sophisticated and automated image processing, such as sharpening, I would not recommend doing it.

If you really want to improve images in post-processing, always do it manually using something like Photoshop or other similar software, and only if you are a pretty good master of re-touch. Open-Source GIMP (http://en.wikipedia.org/wiki/GIMP[^], http://www.gimp.org/[^]) is also a very good thing, in some special aspects even better.

—SA


SA所说的并不完全正确.我不确定为什么要按原样绘制,而不仅仅是设置显示图像的控件的BitmapSource,但是,如果您的控件与原始图像的大小不同,则绘制为不同的宽高比会降低您的形象.

[
What SA said is not entirely correct. I am not sure why you''re drawing it the way you are, instead of just setting the BitmapSource of a control that shows images, but, if your control is a different size to the original image, then drawing to a different aspect ratio can degrade your image.

This[^] is how you set the resizing mode in WPF when drawing an image, you might have to change how you show it to take advantage of that.


这篇关于如何在WPF中提高图像清晰度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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