Add ability to import JXL images

This commit is contained in:
xiota
2021-09-21 22:19:27 -07:00
parent 11240bc97d
commit dfc82c403c
12 changed files with 218 additions and 8 deletions

View File

@@ -212,6 +212,12 @@ 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);
@@ -255,6 +261,15 @@ void Thumbnail::_generateThumbnailImage ()
}
}
if (!tpp) {
// try a custom loader
tpp = rtengine::Thumbnail::loadFromImage(fname, tw, th, -1, pparams->wb.equal, true);
if (tpp) {
cfs.format = FT_Custom;
infoFromImage(fname);
}
}
if (tpp) {
tpp->getAutoWBMultipliers(cfs.redAWBMul, cfs.greenAWBMul, cfs.blueAWBMul);
_saveThumbnail ();