拉伸位图没有损失质量 [英] Stretch Bitmap witout loss quality

查看:98
本文介绍了拉伸位图没有损失质量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个352 x 480大小的位图,我想在尺寸为400 x 400的对话框中显示它.当我在Dialog上使用GDI绘制位图时,我必须拉伸它,但是在拉伸Bitmap时,其质量会失真.我有什么办法可以拉伸和绘制位图而又不会损失位图质量.

Hi,
I have a bitmap of 352 x 480 size and i want to display it on the dialog of size 400 x 400. When i draw the bitmap using GDI on the Dialog i have to stretch it but while stretching Bitmap , its quality is distorted. Is there any way i can stretch and draw the bitmap without loss Bitmap quality.

推荐答案

否.

接下来!

拉伸任何类型的图像时,您都必须发明信息.这会引起问题,并且尽管有一些降低视觉效果的技术,但它们都不是完美的.

但是,您正在做的Whay却更糟:您正在绘制一个矩形并将其重新成形为正方形:
No.

Next!

When you stretch an image of any sort, you have to invent information. This causes problems, and while there are some techniques to reduce the visual effect, none of them are perfect.

Whay you are doing however, is worse: You are taking a rectangle and re-shaping it into a square:
_______        ________________
|     |        |              |
|     |        |              |
|     |        |              |
|     |        |              |
|     |        |              |
|     |        |              |
|     |        |              |
|     |        ----------------
|     |        
|     |        
-------        

您无法像这样拉伸它并且期望不会变形!这就像在橡胶板上画一个圆并拉出两个角.您希望圆保持圆形吗?

There is no way you can stretch it like that and expect no distortion! It''s like drawing a circle on a rubber sheet and pulling two of the corners. Do you expect the circle to remain circular?


这篇关于拉伸位图没有损失质量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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