Added external custom profile generator option
This commit is contained in:
@@ -340,17 +340,33 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
|
||||
|
||||
// try to load the last saved parameters from the cache or from the paramfile file
|
||||
ProcParams* ldprof = NULL;
|
||||
|
||||
Glib::ustring defProf = openThm->getType()==FT_Raw ? options.defProfRaw : options.defProfImg;
|
||||
|
||||
const CacheImageData* cfs=openThm->getCacheImageData();
|
||||
if (!options.customProfileBuilder.empty() && !openThm->hasProcParams() && cfs && cfs->exifValid) {
|
||||
std::ostringstream strm;
|
||||
strm << Glib::ustring("\"") << options.customProfileBuilder << Glib::ustring("\" \"") << openThm->getFileName() << Glib::ustring("\" \"");
|
||||
strm << options.rtdir << Glib::ustring("/") << options.profilePath << Glib::ustring("/") << defProf << Glib::ustring(".pp3");
|
||||
strm << Glib::ustring("\" ") << cfs->fnumber << Glib::ustring(" ") << cfs->shutter << Glib::ustring(" ");
|
||||
strm << cfs->focalLen << Glib::ustring(" ") << cfs->iso << Glib::ustring(" \"");
|
||||
strm << cfs->lens << Glib::ustring("\" \"") << cfs->camera << Glib::ustring("\"");
|
||||
|
||||
bool success = safe_spawn_command_line_sync (strm.str());
|
||||
|
||||
// Now they SHOULD be there, so try to load them
|
||||
if (success) openThm->loadProcParams();
|
||||
}
|
||||
|
||||
if (openThm->hasProcParams()) {
|
||||
ldprof = new ProcParams ();
|
||||
*ldprof = openThm->getProcParams ();
|
||||
}
|
||||
|
||||
rtengine::ImageSource* is=isrc->getImageSource();
|
||||
is->setProgressListener( this );
|
||||
// initialize profile
|
||||
if (openThm->getType()!=FT_Raw)
|
||||
profilep->initProfile (options.defProfImg, ldprof, NULL);
|
||||
else
|
||||
profilep->initProfile (options.defProfRaw, ldprof, NULL);
|
||||
profilep->initProfile (defProf, ldprof, NULL);
|
||||
|
||||
openThm->addThumbnailListener (this);
|
||||
info_toggled ();
|
||||
|
Reference in New Issue
Block a user