Merge pull request #4908 from Beep6581/getridoffeahistogramcache

Get rid of aehistogram files in RT cache.

Merged to get more tests. Issue and pr stay open for a while
This commit is contained in:
Ingo Weyrich
2018-10-31 21:56:00 +01:00
committed by GitHub
4 changed files with 87 additions and 21 deletions

View File

@@ -855,8 +855,10 @@ void Thumbnail::_loadThumbnail(bool firstTrial)
}
if ( cfs.thumbImgType == CacheImageData::FULL_THUMBNAIL ) {
// load aehistogram
tpp->readAEHistogram (getCacheFileName ("aehistograms", ""));
if(!tpp->isAeValid()) {
// load aehistogram
tpp->readAEHistogram (getCacheFileName ("aehistograms", ""));
}
// load embedded profile
tpp->readEmbProfile (getCacheFileName ("embprofiles", ".icc"));
@@ -898,19 +900,15 @@ void Thumbnail::_saveThumbnail ()
return;
}
if (g_remove (getCacheFileName ("images", ".rtti").c_str ()) != 0) {
// No file deleted, so we try to deleted obsolete files, if any
g_remove (getCacheFileName ("images", ".cust").c_str ());
g_remove (getCacheFileName ("images", ".cust16").c_str ());
g_remove (getCacheFileName ("images", ".jpg").c_str ());
}
g_remove (getCacheFileName ("images", ".rtti").c_str ());
// save thumbnail image
tpp->writeImage (getCacheFileName ("images", ""));
// save aehistogram
tpp->writeAEHistogram (getCacheFileName ("aehistograms", ""));
if(!tpp->isAeValid()) {
// save aehistogram
tpp->writeAEHistogram (getCacheFileName ("aehistograms", ""));
}
// save embedded profile
tpp->writeEmbProfile (getCacheFileName ("embprofiles", ".icc"));