]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/png/pngloader.cpp
Include the matching header first in .cpp files
[libs/gui.git] / source / graphics / png / pngloader.cpp
index 190d3cf297488e10977884080c5ad847b8645099..aae7015bddf0a49672682e61e1c60ac645a16bdb 100644 (file)
@@ -1,5 +1,5 @@
-#include <png.h>
 #include "pngloader.h"
+#include <png.h>
 
 using namespace std;
 
@@ -98,8 +98,6 @@ void PngLoader::load_pixels_(Image::Data &data)
                throw bad_image_data(priv->message);
        }
 
-       data.pixels = new char[data.stride*data.height];
-
        if(priv->interlace==PNG_INTERLACE_ADAM7)
        {
                // ADAM7 requires all rows to be loaded at once