使用CXImage Lib绘制位图需要花费更多的CPU时间 [英] Draw Bitmap using CXImage Lib takes more cpu time

查看:74
本文介绍了使用CXImage Lib绘制位图需要花费更多的CPU时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个352 x 480大小的位图,我想在尺寸为400 x 400的对话框中显示它.当我使用带有平滑参数的CXimage库Draw函数绘制位图时,大约需要140毫秒的时间.它使用双线性插值方法来平滑和绘制图像.
我还有其他方法可以在不损失质量的情况下并且在大约50毫秒的时间内拉伸和绘制位图吗?

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 CXimage library Draw function with smooth argument , it takes around 140ms time. it uses the bilinear interpolation method to smooth and draw the image.
Is there any other way i can stretch and Draw the Bitmap without loss quality and in about 50 ms time ?

推荐答案

如果您真的要说无损调整大小,我一定会让您失望因为没有这种东西.在n×m图片中,存在一定数量的信息.如果使用
将此图像调整为k×k或o×p调整为j的图像 & n < o和k < m < p,您会失去质量.在使图像较小的情况下,信息丢失,并且通过放大图像引入了以前不存在的噪声.
如果您想通过不失质量"来说些不同的话,那么您将不得不详细解释.

最好的问候,

-MRB
If you really mean lossless resizing I have to dissappoint you as there is no such thing. In an n by m picture there is a certain amount of information. If this image is resized to an image j by k or o by p with
j < n < o and k < m < p you''ll loose quality. In the case of making the image smaller infomration is lost and by enlarging the image noise is introduced which was not there before.
If you meant to say something different by "without loss of quality" you''ll have to explain in more detail.

Best regards,

-MRB


您可以尝试我的库:纯C重采样DLL" [ ^ ],但是我不不知道它是否比CxImage快.
You may try my library: "Plain C Resampling DLL"[^], however I don''t know if it is faster than CxImage.


这篇关于使用CXImage Lib绘制位图需要花费更多的CPU时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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