Add error code to returns

Fix conditional libjxl compilation
This commit is contained in:
xiota
2021-09-23 13:34:48 -07:00
parent dfc82c403c
commit dd01cc110b
9 changed files with 31 additions and 26 deletions

View File

@@ -212,18 +212,20 @@ void Thumbnail::_generateThumbnailImage ()
if (tpp) {
cfs.format = FT_Jpeg;
}
} else if (ext == "jxl") {
tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, -1, pparams->wb.equal);
if (tpp) {
cfs.format = FT_Png;
}
} else if (ext == "png") {
tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, -1, pparams->wb.equal, pparams->wb.observer);
if (tpp) {
cfs.format = FT_Png;
}
#ifdef LIBJXL
} else if (ext == "jxl") {
tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, -1, pparams->wb.equal);
if (tpp) {
cfs.format = FT_Custom;
}
#endif
} else if (ext == "tif" || ext == "tiff") {
infoFromImage (fname);
tpp = rtengine::Thumbnail::loadFromImage (fname, tw, th, -1, pparams->wb.equal, pparams->wb.observer);