Fix compilation of image sample with wxUSE_LIBPNG==0.
Also don't propose to save the file using the extensions not supported in this library build. Closes #11495. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -210,11 +210,21 @@ private:
|
||||
wxEmptyString,
|
||||
(const wxChar *)NULL,
|
||||
wxT("BMP files (*.bmp)|*.bmp|")
|
||||
#if wxUSE_LIBPNG
|
||||
wxT("PNG files (*.png)|*.png|")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
wxT("JPEG files (*.jpg)|*.jpg|")
|
||||
#endif
|
||||
#if wxUSE_GIF
|
||||
wxT("GIF files (*.gif)|*.gif|")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
wxT("TIFF files (*.tif)|*.tif|")
|
||||
#endif
|
||||
#if wxUSE_PCX
|
||||
wxT("PCX files (*.pcx)|*.pcx|")
|
||||
#endif
|
||||
wxT("ICO files (*.ico)|*.ico|")
|
||||
wxT("CUR files (*.cur)|*.cur"),
|
||||
wxFD_SAVE,
|
||||
@@ -274,6 +284,7 @@ private:
|
||||
}
|
||||
}
|
||||
}
|
||||
#if wxUSE_LIBPNG
|
||||
else if ( extension == wxT("png") )
|
||||
{
|
||||
static const int pngvalues[] =
|
||||
@@ -344,6 +355,7 @@ private:
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_LIBPNG
|
||||
else if ( extension == wxT("cur") )
|
||||
{
|
||||
image.Rescale(32,32);
|
||||
|
Reference in New Issue
Block a user