Suppress libpng errors.

This commit is contained in:
Lymia Aluysia
2017-01-18 09:14:17 -06:00
parent 1d912a6853
commit 76cf6fc0d6
9 changed files with 52 additions and 18 deletions
+2 -1
View File
@@ -14,6 +14,7 @@
#include <data/card.hpp>
#include <gfx/gfx.hpp>
#include <wx/imaglist.h>
#include <gui/util.hpp>
DECLARE_TYPEOF_COLLECTION(FieldP);
@@ -62,7 +63,7 @@ class CardThumbnailRequest : public ThumbnailRequest {
try {
ImageCardList* parent = (ImageCardList*)owner;
Image image;
if (image.LoadFile(*parent->set->openIn(filename))) {
if (image_load_file(image, *parent->set->openIn(filename))) {
// two step anti aliased resampling
image.Rescale(36, 28); // step 1: no anti aliassing
return resample(image, 18, 14); // step 2: with anti aliassing
+2 -1
View File
@@ -11,6 +11,7 @@
#include <util/io/package_manager.hpp>
#include <util/alignment.hpp>
#include <script/profiler.hpp>
#include <gui/util.hpp>
DECLARE_TYPEOF_COLLECTION(PackagedP);
@@ -75,7 +76,7 @@ void PackageList::showData(const String& pattern) {
InputStreamP stream = p->openIconFile();
Image img;
Bitmap bmp;
if (stream && img.LoadFile(*stream)) {
if (stream && image_load_file(img, *stream)) {
bmp = Bitmap(img);
}
// add to list