]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagpng.cpp
1. wxGetFullHostName() does return the full host name now under MSW
[wxWidgets.git] / src / common / imagpng.cpp
index 3673027389e3fa7af114452e39689b19ea2a19f3..f869ffedee51cb09a7e1601ed3860d7629e08267 100644 (file)
@@ -7,10 +7,9 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-/*
-   We don't put pragma implement in this file because it is already present in
-   src/common/image.cpp
-*/
+#ifdef __GNUG__
+#pragma implementation "imagpng.h"
+#endif
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
@@ -25,7 +24,7 @@
 
 #if wxUSE_LIBPNG
 
-#include "wx/image.h"
+#include "wx/imagpng.h"
 #include "wx/bitmap.h"
 #include "wx/debug.h"
 #include "wx/log.h"
@@ -53,9 +52,7 @@
 // wxPNGHandler
 //-----------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARIES
 IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
-#endif
 
 #if wxUSE_LIBPNG
 
@@ -144,18 +141,18 @@ bool wxPNGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
         png_set_expand( png_ptr );
     png_set_filler( png_ptr, 0xff, PNG_FILLER_AFTER );
 
-    image->Create( width, height );
+    image->Create( (int)width, (int)height );
 
     if (!image->Ok())
         goto error_nolines;
 
-    lines = (unsigned char **)malloc( height * sizeof(unsigned char *) );
+    lines = (unsigned char **)malloc( (size_t)(height * sizeof(unsigned char *)) );
     if (lines == NULL)
         goto error_nolines;
 
     for (i = 0; i < height; i++)
     {
-        if ((lines[i] = (unsigned char *)malloc(width * (sizeof(unsigned char) * 4))) == NULL)
+        if ((lines[i] = (unsigned char *)malloc( (size_t)(width * (sizeof(unsigned char) * 4)))) == NULL)
         {
             for ( unsigned int n = 0; n < i; n++ )
                 free( lines[n] );