#if wxUSE_IMAGE && wxUSE_LIBPNG
#include "wx/imagpng.h"
+#include "wx/versioninfo.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
// must be opaque then as otherwise we shouldn't be
// using the mask at all
- wxASSERT_MSG( IsOpaque(a), _T("logic error") );
+ wxASSERT_MSG( IsOpaque(a), wxT("logic error") );
// fall through
{
// must be opaque then as otherwise we shouldn't be
// using the mask at all
- wxASSERT_MSG( IsOpaque(a), _T("logic error") );
+ wxASSERT_MSG( IsOpaque(a), wxT("logic error") );
// if we couldn't find a unique colour for the
// mask, we can have real pixels with the same
break;
default:
- wxFAIL_MSG( _T("unsupported image resolution units") );
+ wxFAIL_MSG( wxT("unsupported image resolution units") );
}
if ( resX && resY )
switch ( iColorType )
{
default:
- wxFAIL_MSG( _T("unknown wxPNG_TYPE_XXX") );
+ wxFAIL_MSG( wxT("unknown wxPNG_TYPE_XXX") );
// fall through
case wxPNG_TYPE_COLOUR:
#endif // wxUSE_STREAMS
+/*static*/ wxVersionInfo wxPNGHandler::GetLibraryVersionInfo()
+{
+ // The version string seems to always have a leading space and a trailing
+ // new line, get rid of them both.
+ wxString str = png_get_header_version(NULL) + 1;
+ str.Replace("\n", "");
+
+ return wxVersionInfo("libpng",
+ PNG_LIBPNG_VER_MAJOR,
+ PNG_LIBPNG_VER_MINOR,
+ PNG_LIBPNG_VER_RELEASE,
+ str);
+}
+
#endif // wxUSE_LIBPNG