Write PP3 before processing image, not after. Hopefully fixes #2494
This commit is contained in:
@@ -1734,15 +1734,18 @@ bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Gl
|
|||||||
ProgressConnector<int> *ld = new ProgressConnector<int>();
|
ProgressConnector<int> *ld = new ProgressConnector<int>();
|
||||||
img->setSaveProgressListener (parent->getProgressListener());
|
img->setSaveProgressListener (parent->getProgressListener());
|
||||||
|
|
||||||
|
rtengine::procparams::ProcParams pparams;
|
||||||
|
ipc->getParams (&pparams);
|
||||||
|
|
||||||
if (sf.format == "tif")
|
if (sf.format == "tif")
|
||||||
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsTIFF), fname, sf.tiffBits, sf.tiffUncompressed),
|
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsTIFF), fname, sf.tiffBits, sf.tiffUncompressed),
|
||||||
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf));
|
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams));
|
||||||
else if (sf.format == "png")
|
else if (sf.format == "png")
|
||||||
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsPNG), fname, sf.pngCompression, sf.pngBits),
|
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsPNG), fname, sf.pngCompression, sf.pngBits),
|
||||||
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf));
|
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams));
|
||||||
else if (sf.format == "jpg")
|
else if (sf.format == "jpg")
|
||||||
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsJPEG), fname, sf.jpegQuality, sf.jpegSubSamp),
|
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsJPEG), fname, sf.jpegQuality, sf.jpegSubSamp),
|
||||||
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf));
|
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams));
|
||||||
else {
|
else {
|
||||||
delete ld;
|
delete ld;
|
||||||
}
|
}
|
||||||
@@ -1762,7 +1765,7 @@ bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Gl
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorPanel::idle_imageSaved (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf)
|
bool EditorPanel::idle_imageSaved (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams)
|
||||||
{
|
{
|
||||||
img->free ();
|
img->free ();
|
||||||
|
|
||||||
@@ -1771,11 +1774,8 @@ bool EditorPanel::idle_imageSaved (ProgressConnector<int> *pc, rtengine::IImage1
|
|||||||
|
|
||||||
// save processing parameters, if needed
|
// save processing parameters, if needed
|
||||||
if (sf.saveParams) {
|
if (sf.saveParams) {
|
||||||
rtengine::procparams::ProcParams pparams;
|
|
||||||
ipc->getParams (&pparams);
|
|
||||||
// We keep the extension to avoid overwriting the profile when we have
|
// We keep the extension to avoid overwriting the profile when we have
|
||||||
// the same output filename with different extension
|
// the same output filename with different extension
|
||||||
//pparams.save (removeExtension (fname) + ".out" + paramFileExtension);
|
|
||||||
pparams.save (fname + ".out" + paramFileExtension);
|
pparams.save (fname + ".out" + paramFileExtension);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@@ -146,7 +146,7 @@ private:
|
|||||||
void close ();
|
void close ();
|
||||||
|
|
||||||
BatchQueueEntry* createBatchQueueEntry ();
|
BatchQueueEntry* createBatchQueueEntry ();
|
||||||
bool idle_imageSaved (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf);
|
bool idle_imageSaved (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams);
|
||||||
bool idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname, SaveFormat sf);
|
bool idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname, SaveFormat sf);
|
||||||
bool idle_sendToGimp ( ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname);
|
bool idle_sendToGimp ( ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname);
|
||||||
bool idle_sentToGimp (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring filename);
|
bool idle_sentToGimp (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring filename);
|
||||||
|
Reference in New Issue
Block a user