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
+1 -1
View File
@@ -33,7 +33,7 @@ void ImageValueViewer::draw(RotatedDC& dc) {
if (!value().filename.empty()) {
try {
InputStreamP image_file = getLocalPackage().openIn(value().filename);
if (image.LoadFile(*image_file)) {
if (image_load_file(image, *image_file)) {
image.Rescale(w, h);
}
} CATCH_ALL_ERRORS(false);
+2 -1
View File
@@ -9,6 +9,7 @@
#include <util/prec.hpp>
#include <render/value/package_choice.hpp>
#include <util/io/package_manager.hpp>
#include <gui/util.hpp>
DECLARE_TYPEOF_COLLECTION(PackagedP);
DECLARE_TYPEOF_COLLECTION(PackageChoiceValueViewer::Item);
@@ -37,7 +38,7 @@ void PackageChoiceValueViewer::initItems() {
i.name = capitalize_sentence(p->short_name);
Image image;
InputStreamP stream = p->openIconFile();
if (stream && image.LoadFile(*stream)) {
if (stream && image_load_file(image, *stream)) {
i.image = Bitmap(resample(image, 16,16));
}
items.push_back(i);