aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx/image/swimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/gfx/image/swimage.cpp')
-rw-r--r--engines/sword25/gfx/image/swimage.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/engines/sword25/gfx/image/swimage.cpp b/engines/sword25/gfx/image/swimage.cpp
index 92d47368b2..0b9cc11df2 100644
--- a/engines/sword25/gfx/image/swimage.cpp
+++ b/engines/sword25/gfx/image/swimage.cpp
@@ -30,7 +30,7 @@
*/
#include "sword25/package/packagemanager.h"
-#include "sword25/gfx/image/pngloader.h"
+#include "sword25/gfx/image/imgloader.h"
#include "sword25/gfx/image/swimage.h"
namespace Sword25 {
@@ -53,18 +53,10 @@ SWImage::SWImage(const Common::String &filename, bool &result) :
return;
}
-#ifndef USE_INTERNAL_PNG_DECODER
- // Determine image properties
- if (!PNGLoader::imageProperties(pFileData, fileSize, _width, _height)) {
- error("Could not read image properties.");
- return;
- }
-#endif
-
// Uncompress the image
int pitch;
byte *pUncompressedData;
- if (!PNGLoader::decodeImage(pFileData, fileSize, pUncompressedData, _width, _height, pitch)) {
+ if (!ImgLoader::decodePNGImage(pFileData, fileSize, pUncompressedData, _width, _height, pitch)) {
error("Could not decode image.");
return;
}