]> git.saurik.com Git - wxWidgets.git/commitdiff
don't waste time initializing the memory of newly created wxImage before filling...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Jul 2004 23:41:54 +0000 (23:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Jul 2004 23:41:54 +0000 (23:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/imagpng.cpp

index 48d7aa52f59b815b4acb210b4883ec544e2de8b8..3bf12e257d0f06028cfe0301a179bd1bf60ed33c 100644 (file)
@@ -570,7 +570,7 @@ wxPNGHandler::LoadFile(wxImage *image,
         png_set_expand( png_ptr );
     png_set_filler( png_ptr, 0xff, PNG_FILLER_AFTER );
 
         png_set_expand( png_ptr );
     png_set_filler( png_ptr, 0xff, PNG_FILLER_AFTER );
 
-    image->Create( (int)width, (int)height );
+    image->Create((int)width, (int)height, false /* no need to init pixels */);
 
     if (!image->Ok())
         goto error;
 
     if (!image->Ok())
         goto error;