]> git.saurik.com Git - wxWidgets.git/blob - src/common/imagall.cpp
Fixed a bug in the latest 'micro optimization' - was skipping one
[wxWidgets.git] / src / common / imagall.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: imagall.cpp
3 // Purpose: wxImage access all handler
4 // Author: Sylvain Bougnoux
5 // RCS-ID: $Id$
6 // Copyright: (c) Sylvain Bougnoux
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 /*
11 We don't put pragma implement in this file because it is already present in
12 src/common/image.cpp
13 */
14
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
17
18 #ifdef __BORLANDC__
19 #pragma hdrstop
20 #endif
21
22 #ifndef WX_PRECOMP
23 # include "wx/setup.h"
24 #endif
25
26 #include "wx/image.h"
27
28 //-----------------------------------------------------------------------------
29 // This function allows dynamic access to all image handlers compile within
30 // the library. This function should be in a separate file as some compilers
31 // link against the whole object file as long as just one of is function is called!
32
33 void wxInitAllImageHandlers()
34 {
35 #if wxUSE_LIBPNG
36 wxImage::AddHandler( new wxPNGHandler );
37 #endif
38 #if wxUSE_LIBJPEG
39 wxImage::AddHandler( new wxJPEGHandler );
40 #endif
41 #if wxUSE_LIBTIFF
42 wxImage::AddHandler( new wxTIFFHandler );
43 #endif
44 #if wxUSE_GIF
45 wxImage::AddHandler( new wxGIFHandler );
46 #endif
47 #if wxUSE_PNM
48 wxImage::AddHandler( new wxPNMHandler );
49 #endif
50 #if wxUSE_PCX
51 wxImage::AddHandler( new wxPCXHandler );
52 #endif
53 }