If you run your application on Windows, you should use the standard GDI + built-in library provided by Microsoft. Every computer running XP or later has this library.
GDI + is intended to replace GDI, which is probably already in use, whether you know it or not, but it can coexist with GDI calls provided that you flush buffers when switching between them. Cm:
http://www.cpjj.net/Miscellaneous/CreateJPEGFromDC.htm
(Hans Passant - you should have written your comment as an answer).
source share