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 -2
View File
@@ -419,7 +419,7 @@ Image PackagedImage::generate(const Options& opt) const {
if (!opt.package) throw ScriptError(_("Can only load images in a context where an image is expected"));
InputStreamP file = opt.package->openIn(filename);
Image img;
if (img.LoadFile(*file)) {
if (image_load_file(img, *file)) {
if (img.HasMask()) img.InitAlpha(); // we can't handle masks
return img;
} else {
@@ -495,7 +495,7 @@ Image ImageValueToImage::generate(const Options& opt) const {
Image image;
if (!filename.empty()) {
InputStreamP image_file = opt.local_package->openIn(filename);
image.LoadFile(*image_file);
image_load_file(image, *image_file);
}
if (!image.Ok()) {
image = Image(max(1,opt.width), max(1,opt.height));