4 * Author: Robert Roebling
6 * Copyright: (C) 1998, Robert Roebling
10 // For compilers that support precompilation, includes "wx/wx.h".
11 #include "wx/wxprec.h"
23 #include "wx/mstream.h"
24 #include "wx/wfstream.h"
25 #include "wx/quantize.h"
29 #if !defined(__WINDOWS__) || wxUSE_XPM_IN_MSW
41 class MyCanvas
: public wxScrolledWindow
45 MyCanvas( wxWindow
*parent
, wxWindowID
, const wxPoint
&pos
, const wxSize
&size
);
47 void OnPaint( wxPaintEvent
&event
);
48 void CreateAntiAliasedBitmap();
50 wxBitmap
*my_horse_png
;
51 wxBitmap
*my_horse_jpeg
;
52 wxBitmap
*my_horse_gif
;
53 wxBitmap
*my_horse_bmp
;
54 wxBitmap
*my_horse_bmp2
;
55 wxBitmap
*my_horse_pcx
;
56 wxBitmap
*my_horse_pnm
;
57 wxBitmap
*my_horse_tiff
;
58 wxBitmap
*my_horse_xpm
;
59 wxBitmap
*my_horse_ico32
;
60 wxBitmap
*my_horse_ico16
;
61 wxBitmap
*my_horse_ico
;
62 wxBitmap
*my_horse_cur
;
64 wxBitmap
*my_smile_xbm
;
71 wxBitmap m_bmpSmileXpm
;
72 wxIcon m_iconSmileXpm
;
75 DECLARE_DYNAMIC_CLASS(MyCanvas
)
80 const int nChoices
= 8 ;
81 static const wxString bppchoices
[nChoices
] =
87 _T("8 bpp greyscale"),
89 _T("8 bpp own palette"),
93 static const int bppvalues
[nChoices
] =
108 class MyFrame
: public wxFrame
113 void OnAbout( wxCommandEvent
&event
);
114 void OnNewFrame( wxCommandEvent
&event
);
115 void OnQuit( wxCommandEvent
&event
);
120 DECLARE_DYNAMIC_CLASS(MyFrame
)
121 DECLARE_EVENT_TABLE()
124 class MyImageFrame
: public wxFrame
127 MyImageFrame(wxFrame
*parent
, const wxBitmap
& bitmap
)
128 : wxFrame(parent
, -1, _T("Double click to save"),
129 wxDefaultPosition
, wxDefaultSize
,
130 wxCAPTION
| wxSYSTEM_MENU
),
133 SetClientSize(bitmap
.GetWidth(), bitmap
.GetHeight());
136 void OnPaint(wxPaintEvent
& WXUNUSED(event
))
138 wxPaintDC
dc( this );
139 //TRUE for masked images
140 dc
.DrawBitmap( m_bitmap
, 0, 0, TRUE
);
143 void OnSave(wxCommandEvent
& WXUNUSED(event
))
145 wxImage image
= m_bitmap
.ConvertToImage();
147 int bppselection
= wxGetSingleChoiceIndex(_T("Set BMP BPP"),
152 if ( bppselection
== -1 )
158 image
.SetOption(wxIMAGE_OPTION_BMP_FORMAT
, bppvalues
[bppselection
]);
160 wxString deffilename
= bppchoices
[bppselection
];
161 deffilename
.Replace(wxT(" "), wxT("_"));
162 deffilename
+= wxT(".bmp");
163 wxString savefilename
= wxFileSelector( wxT("Save Image"),
166 (const wxChar
*)NULL
,
167 wxT("BMP files (*.bmp)|*.bmp|")
168 wxT("PNG files (*.png)|*.png|")
169 wxT("JPEG files (*.jpg)|*.jpg|")
170 wxT("GIF files (*.gif)|*.gif|")
171 wxT("TIFF files (*.tif)|*.tif|")
172 wxT("PCX files (*.pcx)|*.pcx|")
173 wxT("ICO files (*.ico)|*.ico|")
174 wxT("CUR files (*.cur)|*.cur"),
177 if ( savefilename
.empty() )
180 if ( image
.GetOptionInt(wxIMAGE_OPTION_BMP_FORMAT
) == wxBMP_8BPP_PALETTE
)
182 unsigned char *cmap
= new unsigned char [256];
183 for ( int i
= 0; i
< 256; i
++ )
185 image
.SetPalette(wxPalette(256, cmap
, cmap
, cmap
));
191 wxString extension
= savefilename
.AfterLast('.').Lower();
193 if (extension
== _T("cur"))
195 image
.Rescale(32,32);
196 image
.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X
, 0);
197 image
.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y
, 0);
198 // This shows how you can save an image with explicitly
199 // specified image format:
200 loaded
= image
.SaveFile(savefilename
, wxBITMAP_TYPE_CUR
);
204 // This one guesses image format from filename extension
205 // (it may fail if the extension is not recognized):
206 loaded
= image
.SaveFile(savefilename
);
210 wxMessageBox(_T("No handler for this file type."),
211 _T("File was not saved"),
212 wxOK
|wxCENTRE
, this);
218 DECLARE_EVENT_TABLE()
223 class MyApp
: public wxApp
226 virtual bool OnInit();
235 IMPLEMENT_DYNAMIC_CLASS(MyCanvas
, wxScrolledWindow
)
237 BEGIN_EVENT_TABLE(MyImageFrame
, wxFrame
)
238 EVT_PAINT(MyImageFrame::OnPaint
)
239 EVT_LEFT_DCLICK(MyImageFrame::OnSave
)
242 BEGIN_EVENT_TABLE(MyCanvas
, wxScrolledWindow
)
243 EVT_PAINT(MyCanvas::OnPaint
)
246 MyCanvas::MyCanvas( wxWindow
*parent
, wxWindowID id
,
247 const wxPoint
&pos
, const wxSize
&size
)
248 : wxScrolledWindow( parent
, id
, pos
, size
, wxSUNKEN_BORDER
)
249 #if !defined(__WINDOWS__) || wxUSE_XPM_IN_MSW
250 , m_bmpSmileXpm((const char **) smile_xpm
)
251 , m_iconSmileXpm((const char **) smile_xpm
)
254 my_horse_png
= (wxBitmap
*) NULL
;
255 my_horse_jpeg
= (wxBitmap
*) NULL
;
256 my_horse_gif
= (wxBitmap
*) NULL
;
257 my_horse_bmp
= (wxBitmap
*) NULL
;
258 my_horse_bmp2
= (wxBitmap
*) NULL
;
259 my_horse_pcx
= (wxBitmap
*) NULL
;
260 my_horse_pnm
= (wxBitmap
*) NULL
;
261 my_horse_tiff
= (wxBitmap
*) NULL
;
262 my_horse_xpm
= (wxBitmap
*) NULL
;
263 my_horse_ico32
= (wxBitmap
*) NULL
;
264 my_horse_ico16
= (wxBitmap
*) NULL
;
265 my_horse_ico
= (wxBitmap
*) NULL
;
266 my_horse_cur
= (wxBitmap
*) NULL
;
268 my_smile_xbm
= (wxBitmap
*) NULL
;
269 my_square
= (wxBitmap
*) NULL
;
270 my_anti
= (wxBitmap
*) NULL
;
272 SetBackgroundColour(* wxWHITE
);
274 wxBitmap
bitmap( 100, 100 );
277 dc
.SelectObject( bitmap
);
278 dc
.SetBrush( wxBrush( wxT("orange"), wxSOLID
) );
279 dc
.SetPen( *wxBLACK_PEN
);
280 dc
.DrawRectangle( 0, 0, 100, 100 );
281 dc
.SetBrush( *wxWHITE_BRUSH
);
282 dc
.DrawRectangle( 20, 20, 60, 60 );
283 dc
.SelectObject( wxNullBitmap
);
285 // try to find the directory with our images
287 if ( wxFile::Exists(wxT("./horse.png")) )
289 else if ( wxFile::Exists(wxT("../horse.png")) )
292 wxLogWarning(wxT("Can't find image files in either '.' or '..'!"));
294 wxImage image
= bitmap
.ConvertToImage();
297 if ( !image
.SaveFile( dir
+ _T("test.png"), wxBITMAP_TYPE_PNG
))
298 wxLogError(wxT("Can't save file"));
302 image
.LoadFile( dir
+ _T("test.png") );
303 my_square
= new wxBitmap( image
);
307 if ( !image
.LoadFile( dir
+ _T("horse.png")) )
308 wxLogError(wxT("Can't load PNG image"));
310 my_horse_png
= new wxBitmap( image
);
311 #endif // wxUSE_LIBPNG
316 if ( !image
.LoadFile( dir
+ _T("horse.jpg")) )
317 wxLogError(wxT("Can't load JPG image"));
319 my_horse_jpeg
= new wxBitmap( image
);
320 #endif // wxUSE_LIBJPEG
325 if ( !image
.LoadFile( dir
+ wxString("horse.gif")))
326 wxLogError(wxT("Can't load GIF image"));
328 my_horse_gif
= new wxBitmap( image
);
334 if ( !image
.LoadFile( dir
+ _T("horse.pcx"), wxBITMAP_TYPE_PCX
) )
335 wxLogError(wxT("Can't load PCX image"));
337 my_horse_pcx
= new wxBitmap( image
);
342 if ( !image
.LoadFile( dir
+ _T("horse.bmp"), wxBITMAP_TYPE_BMP
) )
343 wxLogError(wxT("Can't load BMP image"));
345 my_horse_bmp
= new wxBitmap( image
);
350 if ( !image
.LoadFile( dir
+ _T("horse.xpm"), wxBITMAP_TYPE_XPM
) )
351 wxLogError(wxT("Can't load XPM image"));
353 my_horse_xpm
= new wxBitmap( image
);
355 if ( !image
.SaveFile( dir
+ _T("test.xpm"), wxBITMAP_TYPE_XPM
))
356 wxLogError(wxT("Can't save file"));
362 if ( !image
.LoadFile( dir
+ _T("horse.pnm"), wxBITMAP_TYPE_PNM
) )
363 wxLogError(wxT("Can't load PNM image"));
365 my_horse_pnm
= new wxBitmap( image
);
371 if ( !image
.LoadFile( dir
+ _T("horse.tif"), wxBITMAP_TYPE_TIF
) )
372 wxLogError(wxT("Can't load TIFF image"));
374 my_horse_tiff
= new wxBitmap( image
);
377 CreateAntiAliasedBitmap();
379 my_smile_xbm
= new wxBitmap( (const char*)smile_bits
, smile_width
,
382 #if !defined(__WINDOWS__) || wxUSE_XPM_IN_MSW
383 // demonstrates XPM automatically using the mask when saving
384 if ( m_bmpSmileXpm
.Ok() )
385 m_bmpSmileXpm
.SaveFile(_T("saved.xpm"), wxBITMAP_TYPE_XPM
);
391 if ( !image
.LoadFile( dir
+ _T("horse.ico"), wxBITMAP_TYPE_ICO
, 0 ) )
392 wxLogError(wxT("Can't load first ICO image"));
394 my_horse_ico32
= new wxBitmap( image
);
398 if ( !image
.LoadFile( dir
+ _T("horse.ico"), wxBITMAP_TYPE_ICO
, 1 ) )
399 wxLogError(wxT("Can't load second ICO image"));
401 my_horse_ico16
= new wxBitmap( image
);
405 if ( !image
.LoadFile( dir
+ _T("horse.ico") ) )
406 wxLogError(wxT("Can't load best ICO image"));
408 my_horse_ico
= new wxBitmap( image
);
412 if ( !image
.LoadFile( dir
+ _T("horse.cur"), wxBITMAP_TYPE_CUR
) )
413 wxLogError(wxT("Can't load best ICO image"));
416 my_horse_cur
= new wxBitmap( image
);
417 xH
= 30 + image
.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X
) ;
418 yH
= 2420 + image
.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_Y
) ;
424 // test image loading from stream
425 wxFile
file(dir
+ _T("horse.bmp"));
426 off_t len
= file
.Length();
427 void *data
= malloc(len
);
428 if ( file
.Read(data
, len
) != len
)
429 wxLogError(_T("Reading bitmap file failed"));
432 wxMemoryInputStream
mis(data
, len
);
433 if ( !image
.LoadFile(mis
) )
434 wxLogError(wxT("Can't load BMP image from stream"));
436 my_horse_bmp2
= new wxBitmap( image
);
442 MyCanvas::~MyCanvas()
446 delete my_horse_jpeg
;
449 delete my_horse_bmp2
;
451 delete my_horse_tiff
;
453 delete my_horse_ico32
;
454 delete my_horse_ico16
;
462 void MyCanvas::OnPaint( wxPaintEvent
&WXUNUSED(event
) )
464 wxPaintDC
dc( this );
467 dc
.DrawText( _T("Loaded image"), 30, 10 );
468 if (my_square
&& my_square
->Ok()) dc
.DrawBitmap( *my_square
, 30, 30 );
470 dc
.DrawText( _T("Drawn directly"), 150, 10 );
471 dc
.SetBrush( wxBrush( wxT("orange"), wxSOLID
) );
472 dc
.SetPen( *wxBLACK_PEN
);
473 dc
.DrawRectangle( 150, 30, 100, 100 );
474 dc
.SetBrush( *wxWHITE_BRUSH
);
475 dc
.DrawRectangle( 170, 50, 60, 60 );
477 if (my_anti
&& my_anti
->Ok())
478 dc
.DrawBitmap( *my_anti
, 280, 30 );
480 dc
.DrawText( _T("PNG handler"), 30, 135 );
481 if (my_horse_png
&& my_horse_png
->Ok())
483 dc
.DrawBitmap( *my_horse_png
, 30, 150 );
484 wxRect
rect(0,0,100,100);
485 wxBitmap
sub( my_horse_png
->GetSubBitmap(rect
) );
486 dc
.DrawText( _T("GetSubBitmap()"), 280, 190 );
487 dc
.DrawBitmap( sub
, 280, 210 );
490 dc
.DrawText( _T("JPEG handler"), 30, 365 );
491 if (my_horse_jpeg
&& my_horse_jpeg
->Ok())
492 dc
.DrawBitmap( *my_horse_jpeg
, 30, 380 );
494 dc
.DrawText( _T("GIF handler"), 30, 595 );
495 if (my_horse_gif
&& my_horse_gif
->Ok())
496 dc
.DrawBitmap( *my_horse_gif
, 30, 610 );
498 dc
.DrawText( _T("PCX handler"), 30, 825 );
499 if (my_horse_pcx
&& my_horse_pcx
->Ok())
500 dc
.DrawBitmap( *my_horse_pcx
, 30, 840 );
502 dc
.DrawText( _T("BMP handler"), 30, 1055 );
503 if (my_horse_bmp
&& my_horse_bmp
->Ok())
504 dc
.DrawBitmap( *my_horse_bmp
, 30, 1070 );
506 dc
.DrawText( _T("BMP read from memory"), 280, 1055 );
507 if (my_horse_bmp2
&& my_horse_bmp2
->Ok())
508 dc
.DrawBitmap( *my_horse_bmp2
, 280, 1070 );
510 dc
.DrawText( _T("PNM handler"), 30, 1285 );
511 if (my_horse_pnm
&& my_horse_pnm
->Ok())
512 dc
.DrawBitmap( *my_horse_pnm
, 30, 1300 );
514 dc
.DrawText( _T("TIFF handler"), 30, 1515 );
515 if (my_horse_tiff
&& my_horse_tiff
->Ok())
516 dc
.DrawBitmap( *my_horse_tiff
, 30, 1530 );
518 dc
.DrawText( _T("XPM handler"), 30, 1745 );
519 if (my_horse_xpm
&& my_horse_xpm
->Ok())
520 dc
.DrawBitmap( *my_horse_xpm
, 30, 1760 );
523 if (my_smile_xbm
&& my_smile_xbm
->Ok())
525 dc
.DrawText( _T("XBM bitmap"), 30, 1975 );
526 dc
.DrawText( _T("(green on red)"), 30, 1990 );
527 dc
.SetTextForeground( _T("GREEN") );
528 dc
.SetTextBackground( _T("RED") );
529 dc
.DrawBitmap( *my_smile_xbm
, 30, 2010 );
531 dc
.SetTextForeground( wxT("BLACK") );
532 dc
.DrawText( _T("After wxImage conversion"), 150, 1975 );
533 dc
.DrawText( _T("(red on white)"), 150, 1990 );
534 dc
.SetTextForeground( wxT("RED") );
535 wxImage i
= my_smile_xbm
->ConvertToImage();
536 i
.SetMaskColour( 255, 255, 255 );
538 wxRED_PEN
->GetColour().Red(),
539 wxRED_PEN
->GetColour().Green(),
540 wxRED_PEN
->GetColour().Blue() );
541 dc
.DrawBitmap( wxBitmap(i
), 150, 2010, TRUE
);
542 dc
.SetTextForeground( wxT("BLACK") );
546 wxBitmap
mono( 60,50,1 );
548 memdc
.SelectObject( mono
);
549 memdc
.SetPen( *wxBLACK_PEN
);
550 memdc
.SetBrush( *wxWHITE_BRUSH
);
551 memdc
.DrawRectangle( 0,0,60,50 );
552 memdc
.SetTextForeground( *wxBLACK
);
553 memdc
.DrawText( _T("Hi!"), 5, 5 );
554 memdc
.SetBrush( *wxBLACK_BRUSH
);
555 memdc
.DrawRectangle( 33,5,20,20 );
556 memdc
.SetPen( *wxRED_PEN
);
557 memdc
.DrawLine( 5, 42, 50, 42 );
558 memdc
.SelectObject( wxNullBitmap
);
562 dc
.DrawText( _T("Mono bitmap"), 30, 2095 );
563 dc
.DrawText( _T("(red on green)"), 30, 2110 );
564 dc
.SetTextForeground( wxT("RED") );
565 dc
.SetTextBackground( wxT("GREEN") );
566 dc
.DrawBitmap( mono
, 30, 2130 );
568 dc
.SetTextForeground( wxT("BLACK") );
569 dc
.DrawText( _T("After wxImage conversion"), 150, 2095 );
570 dc
.DrawText( _T("(red on white)"), 150, 2110 );
571 dc
.SetTextForeground( wxT("RED") );
572 wxImage i
= mono
.ConvertToImage();
573 i
.SetMaskColour( 255,255,255 );
575 wxRED_PEN
->GetColour().Red(),
576 wxRED_PEN
->GetColour().Green(),
577 wxRED_PEN
->GetColour().Blue() );
578 dc
.DrawBitmap( wxBitmap(i
), 150, 2130, TRUE
);
579 dc
.SetTextForeground( wxT("BLACK") );
582 dc
.DrawText(_T("XPM bitmap"), 30, 2230);
583 if ( m_bmpSmileXpm
.Ok() )
585 dc
.DrawBitmap(m_bmpSmileXpm
, 30, 2250, TRUE
);
588 dc
.DrawText(_T("XPM icon"), 150, 2230);
589 if ( m_iconSmileXpm
.Ok() )
591 dc
.DrawIcon(m_iconSmileXpm
, 150, 2250);
594 dc
.DrawText( _T("ICO handler (1st image)"), 30, 2290 );
595 if (my_horse_ico32
&& my_horse_ico32
->Ok())
596 dc
.DrawBitmap( *my_horse_ico32
, 30, 2330, TRUE
);
598 dc
.DrawText( _T("ICO handler (2nd image)"), 230, 2290 );
599 if (my_horse_ico16
&& my_horse_ico16
->Ok())
600 dc
.DrawBitmap( *my_horse_ico16
, 230, 2330, TRUE
);
602 dc
.DrawText( _T("ICO handler (best image)"), 430, 2290 );
603 if (my_horse_ico
&& my_horse_ico
->Ok())
604 dc
.DrawBitmap( *my_horse_ico
, 430, 2330, TRUE
);
606 dc
.DrawText( _T("CUR handler"), 30, 2390 );
607 if (my_horse_cur
&& my_horse_cur
->Ok())
609 dc
.DrawBitmap( *my_horse_cur
, 30, 2420, TRUE
);
610 dc
.SetPen (*wxRED_PEN
);
611 dc
.DrawLine (xH
-10,yH
,xH
+10,yH
);
612 dc
.DrawLine (xH
,yH
-10,xH
,yH
+10);
616 void MyCanvas::CreateAntiAliasedBitmap()
618 wxBitmap
bitmap( 300, 300 );
622 dc
.SelectObject( bitmap
);
626 dc
.SetFont( wxFont( 24, wxDECORATIVE
, wxNORMAL
, wxNORMAL
) );
627 dc
.SetTextForeground( wxT("RED") );
628 dc
.DrawText( _T("This is anti-aliased Text."), 20, 20 );
629 dc
.DrawText( _T("And a Rectangle."), 20, 60 );
631 dc
.SetBrush( *wxRED_BRUSH
);
632 dc
.SetPen( *wxTRANSPARENT_PEN
);
633 dc
.DrawRoundedRectangle( 20, 100, 200, 180, 20 );
635 wxImage original
= bitmap
.ConvertToImage();
636 wxImage
anti( 150, 150 );
638 /* This is quite slow, but safe. Use wxImage::GetData() for speed instead. */
640 for (int y
= 1; y
< 149; y
++)
641 for (int x
= 1; x
< 149; x
++)
643 int red
= original
.GetRed( x
*2, y
*2 ) +
644 original
.GetRed( x
*2-1, y
*2 ) +
645 original
.GetRed( x
*2, y
*2+1 ) +
646 original
.GetRed( x
*2+1, y
*2+1 );
649 int green
= original
.GetGreen( x
*2, y
*2 ) +
650 original
.GetGreen( x
*2-1, y
*2 ) +
651 original
.GetGreen( x
*2, y
*2+1 ) +
652 original
.GetGreen( x
*2+1, y
*2+1 );
655 int blue
= original
.GetBlue( x
*2, y
*2 ) +
656 original
.GetBlue( x
*2-1, y
*2 ) +
657 original
.GetBlue( x
*2, y
*2+1 ) +
658 original
.GetBlue( x
*2+1, y
*2+1 );
660 anti
.SetRGB( x
, y
, red
, green
, blue
);
662 my_anti
= new wxBitmap(anti
);
667 const int ID_QUIT
= 108;
668 const int ID_ABOUT
= 109;
669 const int ID_NEW
= 110;
671 IMPLEMENT_DYNAMIC_CLASS( MyFrame
, wxFrame
)
673 BEGIN_EVENT_TABLE(MyFrame
,wxFrame
)
674 EVT_MENU (ID_ABOUT
, MyFrame::OnAbout
)
675 EVT_MENU (ID_QUIT
, MyFrame::OnQuit
)
676 EVT_MENU (ID_NEW
, MyFrame::OnNewFrame
)
680 : wxFrame( (wxFrame
*)NULL
, -1, _T("wxImage sample"),
681 wxPoint(20,20), wxSize(470,360) )
683 wxMenu
*file_menu
= new wxMenu();
684 file_menu
->Append( ID_NEW
, _T("&Show image..."));
685 file_menu
->AppendSeparator();
686 file_menu
->Append( ID_ABOUT
, _T("&About..."));
687 file_menu
->AppendSeparator();
688 file_menu
->Append( ID_QUIT
, _T("E&xit"));
690 wxMenuBar
*menu_bar
= new wxMenuBar();
691 menu_bar
->Append(file_menu
, _T("&File"));
693 SetMenuBar( menu_bar
);
696 int widths
[] = { -1, 100 };
697 SetStatusWidths( 2, widths
);
699 m_canvas
= new MyCanvas( this, -1, wxPoint(0,0), wxSize(10,10) );
701 // 500 width * 2500 height
702 m_canvas
->SetScrollbars( 10, 10, 50, 250 );
705 void MyFrame::OnQuit( wxCommandEvent
&WXUNUSED(event
) )
710 void MyFrame::OnAbout( wxCommandEvent
&WXUNUSED(event
) )
712 (void)wxMessageBox( _T("wxImage demo\n")
713 _T("Robert Roebling (c) 1998,2000"),
714 _T("About wxImage Demo"), wxICON_INFORMATION
| wxOK
);
717 void MyFrame::OnNewFrame( wxCommandEvent
&WXUNUSED(event
) )
719 wxString filename
= wxFileSelector(_T("Select image file"));
724 if ( !image
.LoadFile(filename
) )
726 wxLogError(_T("Couldn't load image from '%s'."), filename
.c_str());
731 (new MyImageFrame(this, wxBitmap(image
)))->Show();
734 //-----------------------------------------------------------------------------
736 //-----------------------------------------------------------------------------
741 wxImage::AddHandler( new wxPNGHandler
);
745 wxImage::AddHandler( new wxJPEGHandler
);
749 wxImage::AddHandler( new wxTIFFHandler
);
753 wxImage::AddHandler( new wxGIFHandler
);
757 wxImage::AddHandler( new wxPCXHandler
);
761 wxImage::AddHandler( new wxPNMHandler
);
765 wxImage::AddHandler( new wxXPMHandler
);
769 wxImage::AddHandler( new wxICOHandler
);
770 wxImage::AddHandler( new wxCURHandler
);
773 wxFrame
*frame
= new MyFrame();