Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Who can send me an efficient algorithm of image scaling for C / C + + source code?
By the way, CXImage is achieved in the image scaling? How to call?
Posted
Comments
Wild-Programmer 18-Feb-11 3:34am    
I can send you that, but what will I get :P

 
Share this answer
 
Comments
markliu-codeproject 18-Feb-11 22:37pm    
Amit Kumar Tiwari,thanks very much.
Your answer is very useful!
Wild-Programmer 19-Feb-11 11:38am    
Welcome buddy
The GDI resize API is called StretchBlt().
 
Share this answer
 
Comments
Andrew Brock 18-Feb-11 6:34am    
GDI is simple to use, but somewhat lacking in performance, which was a requirement of the OP. 4.
Hans Dietrich 18-Feb-11 13:40pm    
I considered GDI's performance for .5 seconds before answering, then I figured the OP would like to have something that actually works in the general case. :)
If you're really keen on this, why not dash off an article comparing relative performance (GDI vs. ?) for image resize? I would love to read that. There are many algos floating around for doing this, but most simply don't work (at least on the images I've tried). StretchBlt() always works. Seriously, if you know this stuff, please write an article.
Andrew Brock 19-Feb-11 3:42am    
If I had the time I would have written lots of articles. But I'm currently working on a thesis.
I only help out in here because it doesn't take much time.
Rais Shaikh 11-Jul-16 6:01am    
I tried using StretchBlt but image quality is changing as well as some pixels are giving different values using Getpixel function..
markliu-codeproject 18-Feb-11 22:40pm    
Sorry,I can not use StretchBlt.
You might try my DLL (see the article: "Plain C Resampling DLL"[^]), however, I don't know if its performance would fit your needs.
:)
 
Share this answer
 
Comments
markliu-codeproject 18-Feb-11 22:39pm    
CPallini,Thanks very much.
I will try your dll later.
CPallini 19-Feb-11 3:37am    
You're welcome. :-)

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