From cc4d650fad7a361582429dde727b7cea0727ae76 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 12 Jun 2013 07:21:16 +0000 Subject: [PATCH] tga file load speed improvement --- .../shared_lib/sources/graphics/TGAReader.cpp | 67 +++++++++++++------ 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/source/shared_lib/sources/graphics/TGAReader.cpp b/source/shared_lib/sources/graphics/TGAReader.cpp index 1242b35bb..33d12a6e5 100644 --- a/source/shared_lib/sources/graphics/TGAReader.cpp +++ b/source/shared_lib/sources/graphics/TGAReader.cpp @@ -254,11 +254,12 @@ Pixmap2D* TGAReader::read(ifstream& in, const string& path, Pixmap2D* ret) const //std::cout << "TGA-Components: Pic: " << picComponents << " old: " << (ret->getComponents()) << " File: " << fileComponents << std::endl; ret->init(w,h,picComponents); uint8* pixels = ret->getPixels(); + //read file - for(int i=0; i