Click here to Skip to main content
11,705,451 members (59,784 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++
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 17-Feb-11 21:28pm
Amit Kumar Tiwari at 18-Feb-11 3:34am
I can send you that, but what will I get :P
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

markliu-codeproject at 18-Feb-11 22:37pm
Amit Kumar Tiwari,thanks very much.
Your answer is very useful!
Amit Kumar Tiwari at 19-Feb-11 11:38am
Welcome buddy
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The GDI resize API is called StretchBlt().
Andrew Brock at 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 at 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 at 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.
markliu-codeproject at 18-Feb-11 22:40pm
Sorry,I can not use StretchBlt.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

You might try my DLL (see the article: "Plain C Resampling DLL"[^]), however, I don't know if its performance would fit your needs.
Smile | :)
markliu-codeproject at 18-Feb-11 22:39pm
CPallini,Thanks very much.
I will try your dll later.
CPallini at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 500
1 OriginalGriff 269
2 CPallini 82
3 ppolymorphe 68
4 Inimicos 60
0 OriginalGriff 9,053
1 Sergey Alexandrovich Kryukov 8,347
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626

Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 18 Feb 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100