如何在winforms中显示pciturebox中的清晰图片 [英] How to display clear picture in pciturebox in winforms

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

问题描述

大家好,



我创建了一个基于窗口的应用程序。



我在哪里在数据库中插入/取出图像。



当我在图片框中显示图像时,它显示图像分辨率不佳。



图像分辨率不是那么完美,因为它最初是。



我尝试过:



i已经尝试将image.sizemode设置为正常,自动调整大小,居中,拉伸..尝试了一切但是...仍然图像分辨率不好。







任何人都可以帮助我。





谢谢

解决方案

你无法提高任何分辨率。分辨率是设备的属性,例如显示器,打印机。分辨率以每英寸点数,每毫米点数,每毫米线数等来衡量。这通常是不正确的术语使用。



您面临着不同的问题。只是您在屏幕上显示的位图的图像质量很差,或者您通过重新采样使其变得更糟。为了获得最佳结果,您应该显示与位图大小完全相同的图像(以像素为单位)。



现在,如果源图像不是太小,它具有合理的质量,您可以成功地将其重新取样(缩小)到任何尺寸,除了极小的尺寸;它会让你看起来相当不错。但你无法大幅放大图像。如果你这样做,你的图像质量总是很差。原因很明显:你根本没有关于添加到较小图像的像素的信息,所以它们是通过插值获得的,这绝不会太好。



-SA

Hi guys,

I have created one window based application.

Where i'm inserting/fetching images in database.

when i'm displaying image in picturebox, it is showing image in bad resolution.

the image resolution is not so perfect that, as, it is originally.

What I have tried:

i have tried setting image.sizemode to normal, autosize, center, stretch.. tried everything but... still the image resolution is not good.



can anyone plz help me.


Thanks

解决方案

You cannot improve any "resolution". Resolution is the property of a device, such as monitor, printer. Resolution is measured in dots per inch, dots per mm, lines per mm, etc. This is a usual incorrect use of terminology.

You are facing a different problem. It's just the image quality of a bitmap you show on screen is poor, or you make it worse by re-sampling it. For best possible results, you should show the image of exact same size as the size of a bitmap in pixels.

Now, if the source image is not too small and it has reasonable quality, you can successfully re-sample it down (down-scale) to any size, except extremely small sizes; and it will give you reasonably good look. But you cannot considerably enlarge the image. If you do it, you always get poor image quality. The reasons are quite obvious: you simply have no information on the pixels added to the smaller image, so they are obtained via interpolation, which never can be too good.

—SA


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

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