]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/common/imagall.cpp
fixing overrelease and out-of-bounds write, fixes #13725
[wxWidgets.git] / src / common / imagall.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/common/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// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
13#ifdef __BORLANDC__
14 #pragma hdrstop
15#endif
16
17#if wxUSE_IMAGE
18
19#ifndef WX_PRECOMP
20 #include "wx/image.h"
21#endif
22
23//-----------------------------------------------------------------------------
24// This function allows dynamic access to all image handlers compile within
25// the library. This function should be in a separate file as some compilers
26// link against the whole object file as long as just one of is function is called!
27
28void wxInitAllImageHandlers()
29{
30#if wxUSE_LIBPNG
31 wxImage::AddHandler( new wxPNGHandler );
32#endif
33#if wxUSE_LIBJPEG
34 wxImage::AddHandler( new wxJPEGHandler );
35#endif
36#if wxUSE_LIBTIFF
37 wxImage::AddHandler( new wxTIFFHandler );
38#endif
39#if wxUSE_GIF
40 wxImage::AddHandler( new wxGIFHandler );
41#endif
42#if wxUSE_PNM
43 wxImage::AddHandler( new wxPNMHandler );
44#endif
45#if wxUSE_PCX
46 wxImage::AddHandler( new wxPCXHandler );
47#endif
48#if wxUSE_IFF
49 wxImage::AddHandler( new wxIFFHandler );
50#endif
51#if wxUSE_ICO_CUR
52 wxImage::AddHandler( new wxICOHandler );
53 wxImage::AddHandler( new wxCURHandler );
54 wxImage::AddHandler( new wxANIHandler );
55#endif
56#if wxUSE_TGA
57 wxImage::AddHandler( new wxTGAHandler );
58#endif
59#if wxUSE_XPM
60 wxImage::AddHandler( new wxXPMHandler );
61#endif
62}
63
64#endif // wxUSE_IMAGE