make rtengine::processImage return an Imagefloat instead of an Image16

This is for supporting saving to 32-bit float TIFFs
This commit is contained in:
Alberto Griggio
2017-11-20 00:10:51 +01:00
parent d47e7f67b2
commit bc8b8902e6
15 changed files with 157 additions and 96 deletions

View File

@@ -325,50 +325,50 @@ Image16::tofloat()
return imgfloat;
}
// Parallized transformation; create transform with cmsFLAGS_NOCACHE!
void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy)
{
// LittleCMS cannot parallelize planar Lab float images
// so build temporary buffers to allow multi processor execution
#ifdef _OPENMP
#pragma omp parallel
#endif
{
AlignedBuffer<float> bufferLab(width * 3);
AlignedBuffer<unsigned short> bufferRGB(width * 3);
// // Parallized transformation; create transform with cmsFLAGS_NOCACHE!
// void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy)
// {
// // LittleCMS cannot parallelize planar Lab float images
// // so build temporary buffers to allow multi processor execution
// #ifdef _OPENMP
// #pragma omp parallel
// #endif
// {
// AlignedBuffer<float> bufferLab(width * 3);
// AlignedBuffer<unsigned short> bufferRGB(width * 3);
#ifdef _OPENMP
#pragma omp for schedule(static)
#endif
// #ifdef _OPENMP
// #pragma omp for schedule(static)
// #endif
for (int y = cy; y < cy + height; y++)
{
unsigned short *pRGB, *pR, *pG, *pB;
float *pLab, *pL, *pa, *pb;
// for (int y = cy; y < cy + height; y++)
// {
// unsigned short *pRGB, *pR, *pG, *pB;
// float *pLab, *pL, *pa, *pb;
pLab= bufferLab.data;
pL = labImage.L[y] + cx;
pa = labImage.a[y] + cx;
pb = labImage.b[y] + cx;
// pLab= bufferLab.data;
// pL = labImage.L[y] + cx;
// pa = labImage.a[y] + cx;
// pb = labImage.b[y] + cx;
for (int x = 0; x < width; x++) {
*(pLab++) = *(pL++) / 327.68f;
*(pLab++) = *(pa++) / 327.68f;
*(pLab++) = *(pb++) / 327.68f;
}
// for (int x = 0; x < width; x++) {
// *(pLab++) = *(pL++) / 327.68f;
// *(pLab++) = *(pa++) / 327.68f;
// *(pLab++) = *(pb++) / 327.68f;
// }
cmsDoTransform (hTransform, bufferLab.data, bufferRGB.data, width);
// cmsDoTransform (hTransform, bufferLab.data, bufferRGB.data, width);
pRGB = bufferRGB.data;
pR = r(y - cy);
pG = g(y - cy);
pB = b(y - cy);
// pRGB = bufferRGB.data;
// pR = r(y - cy);
// pG = g(y - cy);
// pB = b(y - cy);
for (int x = 0; x < width; x++) {
*(pR++) = *(pRGB++);
*(pG++) = *(pRGB++);
*(pB++) = *(pRGB++);
}
} // End of parallelization
}
}
// for (int x = 0; x < width; x++) {
// *(pR++) = *(pRGB++);
// *(pG++) = *(pRGB++);
// *(pB++) = *(pRGB++);
// }
// } // End of parallelization
// }
// }

View File

@@ -96,7 +96,7 @@ public:
delete this;
}
void ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy);
/* void ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy); */
};
}

View File

@@ -154,11 +154,25 @@ void Imagefloat::getScanline (int row, unsigned char* buffer, int bps)
int ix = 0;
float* sbuffer = (float*) buffer;
// agriggio -- assume the image is normalized to [0, 65535]
for (int i = 0; i < width; i++) {
sbuffer[ix++] = r(row, i) / 65535.f;
sbuffer[ix++] = g(row, i) / 65535.f;
sbuffer[ix++] = b(row, i) / 65535.f;
}
} else if (bps == 16) {
unsigned short *sbuffer = (unsigned short *)buffer;
for (int i = 0, ix = 0; i < width; i++) {
sbuffer[ix++] = r(row, i);
sbuffer[ix++] = g(row, i);
sbuffer[ix++] = b(row, i);
}
} else if (bps == 8) {
for (int i = 0, ix = 0; i < width; i++) {
buffer[ix++] = rtengine::uint16ToUint8Rounded(r(row, i));
buffer[ix++] = rtengine::uint16ToUint8Rounded(g(row, i));
buffer[ix++] = rtengine::uint16ToUint8Rounded(b(row, i));
}
}
}
@@ -511,3 +525,51 @@ void Imagefloat::ExecCMSTransform(cmsHTRANSFORM hTransform)
} // End of parallelization
}
}
// Parallized transformation; create transform with cmsFLAGS_NOCACHE!
void Imagefloat::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy)
{
// LittleCMS cannot parallelize planar Lab float images
// so build temporary buffers to allow multi processor execution
#ifdef _OPENMP
#pragma omp parallel
#endif
{
AlignedBuffer<float> bufferLab(width * 3);
AlignedBuffer<float> bufferRGB(width * 3);
#ifdef _OPENMP
#pragma omp for schedule(static)
#endif
for (int y = cy; y < cy + height; y++)
{
float *pRGB, *pR, *pG, *pB;
float *pLab, *pL, *pa, *pb;
pLab= bufferLab.data;
pL = labImage.L[y] + cx;
pa = labImage.a[y] + cx;
pb = labImage.b[y] + cx;
for (int x = 0; x < width; x++) {
*(pLab++) = *(pL++) / 327.68f;
*(pLab++) = *(pa++) / 327.68f;
*(pLab++) = *(pb++) / 327.68f;
}
cmsDoTransform (hTransform, bufferLab.data, bufferRGB.data, width);
pRGB = bufferRGB.data;
pR = r(y - cy);
pG = g(y - cy);
pB = b(y - cy);
for (int x = 0; x < width; x++) {
*(pR++) = *(pRGB++);
*(pG++) = *(pRGB++);
*(pB++) = *(pRGB++);
}
} // End of parallelization
}
}

View File

@@ -106,6 +106,7 @@ public:
void calcCroppedHistogram(const ProcParams &params, float scale, LUTu & hist);
void ExecCMSTransform(cmsHTRANSFORM hTransform);
void ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy);
};
}

View File

@@ -1270,21 +1270,18 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool
}
}
Image16* im16 = im->to16();
delete im;
int imw, imh;
double tmpScale = ipf.resizeScale (&params, fW, fH, imw, imh);
if (tmpScale != 1.0) {
Image16* tempImage = new Image16 (imw, imh);
ipf.resize (im16, tempImage, tmpScale);
delete im16;
im16 = tempImage;
Imagefloat* tempImage = new Imagefloat (imw, imh);
ipf.resize (im, tempImage, tmpScale);
delete im;
im = tempImage;
}
im16->saveTIFF (fname, 16, true);
delete im16;
im->saveTIFF (fname, 16, true);
delete im;
if (plistener) {
plistener->setProgressState (false);

View File

@@ -239,9 +239,9 @@ public:
void transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const FramesMetaData *metadata, int rawRotationDeg, bool fullImage);
float resizeScale (const ProcParams* params, int fw, int fh, int &imw, int &imh);
void lab2monitorRgb (LabImage* lab, Image8* image);
void resize (Image16* src, Image16* dst, float dScale);
void resize (Imagefloat* src, Imagefloat* dst, float dScale);
void Lanczos (const LabImage* src, LabImage* dst, float scale);
void Lanczos (const Image16* src, Image16* dst, float scale);
void Lanczos (const Imagefloat* src, Imagefloat* dst, float scale);
void deconvsharpening (float** luminance, float** buffer, int W, int H, const SharpeningParams &sharpenParam);
void MLsharpen (LabImage* lab);// Manuel's clarity / sharpening
@@ -347,7 +347,7 @@ public:
void ToneMapFattal02(Imagefloat *rgb);
Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm);
Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, GammaValues *ga = nullptr);
Imagefloat* lab2rgbOut (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, GammaValues *ga = nullptr);
// CieImage *ciec;
bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr);

View File

@@ -262,7 +262,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch,
* If a custom gamma profile can be created, divide by 327.68, convert to xyz and apply the custom gamma transform
* otherwise divide by 327.68, convert to xyz and apply the sRGB transform, before converting with gamma2curve
*/
Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, GammaValues *ga)
Imagefloat* ImProcFunctions::lab2rgbOut (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, GammaValues *ga)
{
if (cx < 0) {
@@ -281,7 +281,7 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int
ch = lab->H - cy;
}
Image16* image = new Image16 (cw, ch);
Imagefloat* image = new Imagefloat (cw, ch);
cmsHPROFILE oprof = nullptr;
if (ga) {
@@ -300,11 +300,12 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int
}
lcmsMutex->lock ();
cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr);
cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, oprof, TYPE_RGB_16, icm.outputIntent, flags);
cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, oprof, TYPE_RGB_FLT, icm.outputIntent, flags);
lcmsMutex->unlock ();
image->ExecCMSTransform(hTransform, *lab, cx, cy);
cmsDeleteTransform(hTransform);
image->normalizeFloatTo65535();
} else {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
@@ -329,9 +330,9 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int
Color::xyz2srgb(x_, y_, z_, R, G, B);
image->r(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(R)];
image->g(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(G)];
image->b(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(B)];
image->r(i - cy, j - cx) = Color::gamma2curve[CLIP(R)];
image->g(i - cy, j - cx) = Color::gamma2curve[CLIP(G)];
image->b(i - cy, j - cx) = Color::gamma2curve[CLIP(B)];
}
}
}

View File

@@ -46,7 +46,7 @@ static inline float Lanc (float x, float a)
}
}
void ImProcFunctions::Lanczos (const Image16* src, Image16* dst, float scale)
void ImProcFunctions::Lanczos (const Imagefloat* src, Imagefloat* dst, float scale)
{
const float delta = 1.0f / scale;
@@ -159,9 +159,9 @@ void ImProcFunctions::Lanczos (const Image16* src, Image16* dst, float scale)
b += wh[k] * lb[jj];
}
dst->r (i, j) = CLIP (static_cast<int> (r));
dst->g (i, j) = CLIP (static_cast<int> (g));
dst->b (i, j) = CLIP (static_cast<int> (b));
dst->r (i, j) = CLIP (r);//static_cast<int> (r));
dst->g (i, j) = CLIP (g);//static_cast<int> (g));
dst->b (i, j) = CLIP (b);//static_cast<int> (b));
}
}
@@ -396,7 +396,7 @@ float ImProcFunctions::resizeScale (const ProcParams* params, int fw, int fh, in
return (float)dScale;
}
void ImProcFunctions::resize (Image16* src, Image16* dst, float dScale)
void ImProcFunctions::resize (Imagefloat* src, Imagefloat* dst, float dScale)
{
#ifdef PROFILE
time_t t1 = clock();

View File

@@ -534,7 +534,7 @@ public:
* @param pl is an optional ProgressListener if you want to keep track of the progress
* @param tunnelMetaData tunnels IPTC and XMP to output without change
* @return the resulting image, with the output profile applied, exif and iptc data set. You have to save it or you can access the pixel data directly. */
IImage16* processImage (ProcessingJob* job, int& errorCode, ProgressListener* pl = nullptr, bool tunnelMetaData = false, bool flush = false);
IImagefloat* processImage (ProcessingJob* job, int& errorCode, ProgressListener* pl = nullptr, bool tunnelMetaData = false, bool flush = false);
/** This class is used to control the batch processing. The class implementing this interface will be called when the full processing of an
* image is ready and the next job to process is needed. */
@@ -545,7 +545,7 @@ public:
* there is no jobs left.
* @param img is the result of the last ProcessingJob
* @return the next ProcessingJob to process */
virtual ProcessingJob* imageReady (IImage16* img) = 0;
virtual ProcessingJob* imageReady (IImagefloat* img) = 0;
virtual void error (Glib::ustring message) = 0;
};
/** This function performs all the image processinf steps corresponding to the given ProcessingJob. It runs in the background, thus it returns immediately,

View File

@@ -66,7 +66,7 @@ public:
{
}
Image16 *operator()()
Imagefloat *operator()()
{
if (!job->fast) {
return normal_pipeline();
@@ -76,7 +76,7 @@ public:
}
private:
Image16 *normal_pipeline()
Imagefloat *normal_pipeline()
{
if (!stage_init()) {
return nullptr;
@@ -87,7 +87,7 @@ private:
return stage_finish();
}
Image16 *fast_pipeline()
Imagefloat *fast_pipeline()
{
if (!job->pparams.resize.enabled) {
return normal_pipeline();
@@ -831,7 +831,7 @@ private:
}
}
Image16 *stage_finish()
Imagefloat *stage_finish()
{
procparams::ProcParams& params = job->pparams;
//ImProcFunctions ipf (&params, true);
@@ -1227,7 +1227,7 @@ private:
}
}
Image16* readyImg = nullptr;
Imagefloat* readyImg = nullptr;
cmsHPROFILE jprof = nullptr;
bool customGamma = false;
bool useLCMS = false;
@@ -1237,7 +1237,7 @@ private:
GammaValues ga;
// if(params.blackwhite.enabled) params.toneCurve.hrenabled=false;
readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, &ga);
readyImg = ipf.lab2rgbOut (labView, cx, cy, cw, ch, params.icm, &ga);
customGamma = true;
//or selected Free gamma
@@ -1251,7 +1251,7 @@ private:
// if Default gamma mode: we use the profile selected in the "Output profile" combobox;
// gamma come from the selected profile, otherwise it comes from "Free gamma" tool
readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm);
readyImg = ipf.lab2rgbOut (labView, cx, cy, cw, ch, params.icm);
if (settings->verbose) {
printf ("Output profile_: \"%s\"\n", params.icm.output.c_str());
@@ -1281,7 +1281,7 @@ private:
}
if (tmpScale != 1.0 && params.resize.method == "Nearest") { // resize rgb data (gamma applied)
Image16* tempImage = new Image16 (imw, imh);
Imagefloat* tempImage = new Imagefloat (imw, imh);
ipf.resize (readyImg, tempImage, tmpScale);
delete readyImg;
readyImg = tempImage;
@@ -1566,7 +1566,7 @@ private:
} // namespace
IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* pl, bool tunnelMetaData, bool flush)
IImagefloat* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* pl, bool tunnelMetaData, bool flush)
{
ImageProcessor proc (pjob, errorCode, pl, tunnelMetaData, flush);
return proc();
@@ -1579,7 +1579,7 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo
while (currentJob) {
int errorCode;
IImage16* img = processImage (currentJob, errorCode, bpl, tunnelMetaData, true);
IImagefloat* img = processImage (currentJob, errorCode, bpl, tunnelMetaData, true);
if (errorCode) {
bpl->error (M ("MAIN_MSG_CANNOTLOAD"));

View File

@@ -578,7 +578,7 @@ void BatchQueue::startProcessing ()
}
}
rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImage16* img)
rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImagefloat* img)
{
// save image img

View File

@@ -62,7 +62,7 @@ public:
return (!fd.empty());
}
rtengine::ProcessingJob* imageReady (rtengine::IImage16* img);
rtengine::ProcessingJob* imageReady (rtengine::IImagefloat* img);
void error (Glib::ustring msg);
void setProgress (double p);
void rightClicked (ThumbBrowserEntryBase* entry);

View File

@@ -1751,9 +1751,9 @@ void EditorPanel::procParamsChanged (Thumbnail* thm, int whoChangedIt)
}
}
bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams)
bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImagefloat*> *pc, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams)
{
rtengine::IImage16* img = pc->returnValue();
rtengine::IImagefloat* img = pc->returnValue();
delete pc;
if ( img ) {
@@ -1764,13 +1764,13 @@ bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Gl
img->setSaveProgressListener (parent->getProgressListener());
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::IImagefloat::saveAsTIFF), fname, sf.tiffBits, sf.tiffUncompressed),
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams));
else if (sf.format == "png")
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsPNG), fname, sf.pngBits),
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImagefloat::saveAsPNG), fname, sf.pngBits),
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams));
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::IImagefloat::saveAsJPEG), fname, sf.jpegQuality, sf.jpegSubSamp),
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams));
else {
delete ld;
@@ -1791,7 +1791,7 @@ bool EditorPanel::idle_saveImage (ProgressConnector<rtengine::IImage16*> *pc, Gl
return false;
}
bool EditorPanel::idle_imageSaved (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams)
bool EditorPanel::idle_imageSaved (ProgressConnector<int> *pc, rtengine::IImagefloat* img, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams)
{
img->free ();
@@ -1916,7 +1916,7 @@ void EditorPanel::saveAsPressed ()
ipc->getParams (&pparams);
rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams);
ProgressConnector<rtengine::IImage16*> *ld = new ProgressConnector<rtengine::IImage16*>();
ProgressConnector<rtengine::IImagefloat*> *ld = new ProgressConnector<rtengine::IImagefloat*>();
ld->startFunc (sigc::bind (sigc::ptr_fun (&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ),
sigc::bind (sigc::mem_fun ( *this, &EditorPanel::idle_saveImage ), ld, fnameOut, sf, pparams));
saveimgas->set_sensitive (false);
@@ -1960,7 +1960,7 @@ void EditorPanel::sendToGimpPressed ()
rtengine::procparams::ProcParams pparams;
ipc->getParams (&pparams);
rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams);
ProgressConnector<rtengine::IImage16*> *ld = new ProgressConnector<rtengine::IImage16*>();
ProgressConnector<rtengine::IImagefloat*> *ld = new ProgressConnector<rtengine::IImagefloat*>();
ld->startFunc (sigc::bind (sigc::ptr_fun (&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ),
sigc::bind (sigc::mem_fun ( *this, &EditorPanel::idle_sendToGimp ), ld, openThm->getFileName() ));
saveimgas->set_sensitive (false);
@@ -1975,7 +1975,7 @@ bool EditorPanel::saveImmediately (const Glib::ustring &filename, const SaveForm
rtengine::ProcessingJob *job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams);
// save immediately
rtengine::IImage16 *img = rtengine::processImage (job, err, nullptr, options.tunnelMetaData, false);
rtengine::IImagefloat *img = rtengine::processImage (job, err, nullptr, options.tunnelMetaData, false);
int err = 0;
@@ -2015,10 +2015,10 @@ void EditorPanel::syncFileBrowser() // synchronize filebrowser with image in E
}
}
bool EditorPanel::idle_sendToGimp ( ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname)
bool EditorPanel::idle_sendToGimp ( ProgressConnector<rtengine::IImagefloat*> *pc, Glib::ustring fname)
{
rtengine::IImage16* img = pc->returnValue();
rtengine::IImagefloat* img = pc->returnValue();
delete pc;
if (img) {
@@ -2050,7 +2050,7 @@ bool EditorPanel::idle_sendToGimp ( ProgressConnector<rtengine::IImage16*> *pc,
ProgressConnector<int> *ld = new ProgressConnector<int>();
img->setSaveProgressListener (parent->getProgressListener());
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsTIFF), fileName, sf.tiffBits, sf.tiffUncompressed),
ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImagefloat::saveAsTIFF), fileName, sf.tiffBits, sf.tiffUncompressed),
sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_sentToGimp), ld, img, fileName));
} else {
Glib::ustring msg_ = Glib::ustring ("<b> Error during image processing\n</b>");
@@ -2063,7 +2063,7 @@ bool EditorPanel::idle_sendToGimp ( ProgressConnector<rtengine::IImage16*> *pc,
return false;
}
bool EditorPanel::idle_sentToGimp (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring filename)
bool EditorPanel::idle_sentToGimp (ProgressConnector<int> *pc, rtengine::IImagefloat* img, Glib::ustring filename)
{
img->free ();
int errore = pc->returnValue();

View File

@@ -146,10 +146,10 @@ private:
void close ();
BatchQueueEntry* createBatchQueueEntry ();
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, rtengine::procparams::ProcParams &pparams);
bool idle_sendToGimp ( ProgressConnector<rtengine::IImage16*> *pc, Glib::ustring fname);
bool idle_sentToGimp (ProgressConnector<int> *pc, rtengine::IImage16* img, Glib::ustring filename);
bool idle_imageSaved (ProgressConnector<int> *pc, rtengine::IImagefloat* img, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams);
bool idle_saveImage (ProgressConnector<rtengine::IImagefloat*> *pc, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams);
bool idle_sendToGimp ( ProgressConnector<rtengine::IImagefloat*> *pc, Glib::ustring fname);
bool idle_sentToGimp (ProgressConnector<int> *pc, rtengine::IImagefloat* img, Glib::ustring filename);
Glib::ustring lastSaveAsFileName;
bool realized;

View File

@@ -822,7 +822,7 @@ int processLineParams ( int argc, char **argv )
}
// Process image
rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData);
rtengine::IImagefloat* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData);
if ( !resultImage ) {
errors++;