Click here to Skip to main content
15,795,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 ?
Posted
Comments
Nihar Ranjan Nanda 21-Jul-12 13:48pm    
I am a fresher,i just want to learn how to display an image using C or C++,can anyone please put up a complete code(i dont know anything,i will just compile in my Code::Blocks).
I hope it will be fun ,pls pls put it.

Thanks in advance.

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
 
Share this answer
 
You may try my library: "Plain C Resampling DLL"[^], however I don't know if it is faster than CxImage.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900